SQL problem: SELECT * FROM (SELECT globid,ordine,title FROM globalmoneta WHERE parentid="C-GRECIA" AND ordine<"7" GROUP BY ordine DESC LIMIT 1) AS a;