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

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 0.23 KB  |  hits: 10  |  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. SELECT season.*, collection.*
  2.   FROM season
  3.   JOIN
  4.   (SELECT collection_id, MAX(number) AS number FROM season GROUP BY collection_id) AS latest_season
  5.    USING( collection_id, number)
  6.   JOIN collection USING (collection_id)