hi,
i need to create a query which only returns one record per grouping.
for example:
TABLE_X
FIELD_A
FIELD_B
FIEL_DATE_TIME
Something like this:
SELECT FIELD_A, FIELD_B, MAX(FIELD_DATE_TIME)
FROM TABLE_X
GROUP BY FIELD_A, FIELD_B
Thing is, i need the MAX(FIELD_DATE_TIME) being calculated per FIELD_B without FIELD_A. Still i need FIELD_A in the select clause for furher joining.
Basically i need this:
Per FIELD_B value i need to return max 1 record with values FIELD_A, FIELD_B and FIELD_DATE_TIME = MAX(FIELD_DATE_TIME).
Anyone any ideas?
t.i.a.,
ratjetoes.
i need to create a query which only returns one record per grouping.
for example:
TABLE_X
FIELD_A
FIELD_B
FIEL_DATE_TIME
Something like this:
SELECT FIELD_A, FIELD_B, MAX(FIELD_DATE_TIME)
FROM TABLE_X
GROUP BY FIELD_A, FIELD_B
Thing is, i need the MAX(FIELD_DATE_TIME) being calculated per FIELD_B without FIELD_A. Still i need FIELD_A in the select clause for furher joining.
Basically i need this:
Per FIELD_B value i need to return max 1 record with values FIELD_A, FIELD_B and FIELD_DATE_TIME = MAX(FIELD_DATE_TIME).
Anyone any ideas?
t.i.a.,
ratjetoes.