Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

Sorting mysql resultset based on date

Sorting mysql resultset based on date

Hi,
I got 2 columns, "firstName" and "myDate"
"myDate" stores date in this format: "2020-11-29" (YYYY-mm-dd format)
Its a varchar column

There could be multiple records for each "firstName", the date will differ.
example:
('jeet', '2020-05-30'),
('jeet', '2020-05-31'),
('Lucky', '2020-05-31'),
('Lucky', '2020-06-01'),
etc.

I am trying to select all "firstName", but only 1 record for each name, the one with the smallest date.

select * from table...

Sorting mysql resultset based on date

from Databases https://ift.tt/3ge9Smd
via IFTTT

Post a Comment

0 Comments