text: Q:
  
  SQL SELECT items without a character
  
  I have following SQL:
  SELECT 
      M.* 
  FROM 
      (
     SELECT MAX(counter) AS FirstUserDate, imdb_id, language, season, aufloesung, episode
     FROM autofehlerserie
      GROUP BY imdb_id, language
      ) foo 
      JOIN
      autofehlerserie M ON foo.imdb_id = M.imdb_id AND foo.language = M.language
  ORDER BY
      foo.FirstUserDate DESC, M.imdb_id, M.aufloesung, cast(M.season as int), cast(M.episode as int)
  
  But I want only SELECT items WHERE marker not = "D"
  Where I have to add this on this select query?
  
  A:
  
  Use it like below :
  SELECT 
      M.* 
  FROM 
      (
     SELECT MAX(counter) AS FirstUserDate, imdb_id, language, season, aufloesung, episode
     FROM autofehlerserie 
     WHERE marker <> 'D'
      GROUP BY imdb_id, language, season, aufloesung, episode
      ) foo 
      JOIN
      autofehlerserie M ON foo.imdb_id = M.imdb_id AND foo.language = M.language and M.marker <> 'D'
  ORDER BY
      foo.FirstUserDate DESC, M.imdb_id, M.aufloesung, cast(M.season as int), cast(M.episode as int)
  
  