G
giorgio
I wish to try in maximum value of a field for every year and have used the
expression:
SELECT Max(tablename.fieldname) AS MaxOffieldname
FROM tablename
GROUP BY Year([datafield]);
but I don't have some reference and so I must view all the records,
therefore have tried this expression :
SELECT tablename.datafield, tablename.fieldname
FROM tablename
WHERE tablename.fieldname in (SELECT Max(tablename.fieldname) AS
MaxOffieldname
FROM tablename GROUP BY Year([datafield]))
but if two values are identical , give back them equally also not being the
maximum value
Is There other ways to have them?
ex 2001 max 1000,2002 max 1500,2003 max 1350,2004 max 1728 but i have 1000
too.
i need 2001 or(something other in my table like ID) 1000,2002 1500,2003
1350,2004 1728
not 1000, 1500, 1350, 1728
not 2001 1000,2002 1500,2003 1350,2004 1000 1728
thanks
expression:
SELECT Max(tablename.fieldname) AS MaxOffieldname
FROM tablename
GROUP BY Year([datafield]);
but I don't have some reference and so I must view all the records,
therefore have tried this expression :
SELECT tablename.datafield, tablename.fieldname
FROM tablename
WHERE tablename.fieldname in (SELECT Max(tablename.fieldname) AS
MaxOffieldname
FROM tablename GROUP BY Year([datafield]))
but if two values are identical , give back them equally also not being the
maximum value
Is There other ways to have them?
ex 2001 max 1000,2002 max 1500,2003 max 1350,2004 max 1728 but i have 1000
too.
i need 2001 or(something other in my table like ID) 1000,2002 1500,2003
1350,2004 1728
not 1000, 1500, 1350, 1728
not 2001 1000,2002 1500,2003 1350,2004 1000 1728
thanks