I am trying to accomplish the following in MySQL (see pseudo code)
pseudo
SELECT DISTINCT gid FROM `gd` WHERE COUNT(*) > 10 ORDER BY lastupdated DES
Just academic version without having clause:
select * from ( select gid, count(*) as tmpcount from gd group by gid ) as tmp where tmpcount > 10;