How to create this SQL query?

Hello!

Please tell me how to query the table.
There is a table with columns id, year, param1, param2
Filled as follows:
1 - 2018 - ... - ...
2 - 2017 - ... - ...
3 - 2019 - ... - ...
4 - 2019 - ... - ...
5 - 2018 - ... - ...

The question how to write a query to get the rows for 2019, BUT do not indicate it explicitly in the query
WHERE year = 2019 is wrong.
Ie you need to get the rows for the maximum year
March 19th 20 at 08:32
1 answer
March 19th 20 at 08:34
SELECT * FROM table_name WHERE
year = (SELECT MAX(year) FROM table_name);

Find more questions by tags MySQL