SELECT f.* from (SELECT country, min(id) as MinId FROM mytable GROUP BY country) as X INNER JOIN mytable as f ON f.country = x.country AND f.id = x.MinId order BY f.country
Thursday, February 17, 2011
Subscribe to:
Post Comments (Atom)
SELECT f.* from (SELECT country, min(id) as MinId FROM mytable GROUP BY country) as X INNER JOIN mytable as f ON f.country = x.country AND f.id = x.MinId order BY f.country
No comments:
Post a Comment