Can You help me construct sql query which pulls out of database the entries which have the latest date.
I tried but come to deadend
SELECT *
FROM Table t,Table t2
WHERE t.date>t2.date
I think i have to use some temporary tables...it is a bit dificult for me
Retrieve rows ordered by date, descending:
SELECT * FROM table ORDER BY date DESC
Retrieve the 5 rows with the most recent dates:
SELECT * FROM table ORDER BY date DESC LIMIT 5
Try:
select * from Table where date_column = (select max(date_column) from Table)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With