GROUP BY a date, with ordering by date.
- by standard
Take this simple query:
SELECT DATE_FORMAT(someDate, '%y-%m-%d') as formattedDay
FROM someTable
GROUP BY formatterDay
This will select rows from a table with only 1 row per date.
How do I ensure that the row selected per date is the earliest for that date, without doing an ordered subquery in the FROM?
Cheers