forrestgump
Registered User.
- Local time
- Today, 23:41
- Joined
- Aug 14, 2017
- Messages
- 10
Hi there,
I have a stacked rows of data in a table and i want the query to just return the entire row of the row with the earliest date. I have tried a varitety of things to achieve this but with no luck. I tried by Group By on just the emp id record and then selecting on first for all the other records, but unfortunately this doesn't work even when when the values are sorted e.g.:-
I have also tried using min on just the start-date field but this mixes up information on the rows:-
Any ideas anyone? Any help would be greatly appreciated.
Regards,
ForrestGump
I have a stacked rows of data in a table and i want the query to just return the entire row of the row with the earliest date. I have tried a varitety of things to achieve this but with no luck. I tried by Group By on just the emp id record and then selecting on first for all the other records, but unfortunately this doesn't work even when when the values are sorted e.g.:-
PHP:
user-id custom-string1
Group By custom-string2
First custom-string3
First custom-string4
First custom-string5
First custom-string6
First start-date
PHP:
Group By custom-string2
First custom-string3
First custom-string4
First custom-string5
First custom-string6
Min start-date
Regards,
ForrestGump