Level 10
@rhaeg One solution for this arranging the table in descending order according to the date. And then getting the first element.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I have a little problem with my request SQL:
i have table like this :
id | name |date
1 test1 2020-05-05
2 test1 2020-06-05
3 test2 2020-03-05
4 test3 2020-05-09
5 test3 2020-06-10
And i would like take the last element when is same name, for result like this:
id 2/3/5
if i group by i have first element..
( I cant use laravel for this request )
Ty for your help
Please or to participate in this conversation.