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
SELECT COUNT(*) FROM `gd` GROUP BY gid HAVING COUNT(gid) > 10 ORDER BY lastupdated DESC;
EDIT (if you just want the gids):
SELECT MIN(gid) FROM `gd` GROUP BY gid HAVING COUNT(gid) > 10 ORDER BY lastupdated DESC