so I have a table "records" like this:
name month year
Rafael 9 2018
Rafael 5 2018
Rafael 10 2017
And I want to get my last records (Rafael, 9, 2018). I thought about summing the month and the year and getting the max of that sum like this:
select * from records, max(month + year) as max_date
But doesn't seem to be right. Thanks for help
(Rafael, 5, 2018)record. Can you explain the logic behind your intended query?9 + 2018or10 + 2017the results are the same!SELECT TOP 1 * FROM records