Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 0.26 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. WHERE clause null? don't understand
  2. select t1.* from mytable t1
  3.     left join mytable t2
  4.     on t1.parentid = t2.parentid and t1.rating < t2.rating
  5.     join mytable parents
  6.     on parents.id = t1.parentid
  7.     where t2.rating is null AND parents.name like '%mike%'