SQL query to select record having max value in a field by each group.

SQL query to select record having max value in a field by each group.

Hi
 
I would like to select fields in records having max value in "Date" for each group by Code.
 
I executed the following SQL to do it. But It seems that the SQL is not supported by Zoho yet.

SELECT T1."Code", T1."Date" , "52 Week High" FROM "hprc" AS T1
INNER JOIN (SELECT "Code" AS F1, MAX("Date") AS F2 FROM "hprc" GROUP BY "Code") AS Q1
ON Q1.F1=T1."Code" AND Q1.F2=T1."Date";




Regards
Keita