Hi,
I having problems returning only the first row of data for each GROUP
for the query below. Can someone please help? Thanks.
SELECT bid, xact_date, xact_time
FROM badge_history bh
GROUP BY bid, xact_date, xact_time
ORDER BY bid, xact_date DESC, xact_time DESC
So if the data returned by the above query is:
bid xact_date xact_time
-------------------------------------------------
0000000025697510 20021205 111822
0000000025697510 20021205 111816
0000000025697510 20021205 111810
151744034643 20030122 113244
151744034643 20030117 165815
151744034643 20030117 165757
151744034643 20030117 165739
151744034643 20030117 165727
Then I need the new query to produce:
bid xact_date xact_time
-------------------------------------------------
0000000025697510 20021205 111822
151744034643 20030122 113244
Can anyone suggest anything that might work!? Thanks again.