I've multiple value saved in one table. Each value correspond to a year, for example:
YEAR | NAME
2014/2015 | Udine
2014/2015 | Firence
2015/2016 | Milan
2015/2016 | Chievo
In my query I want return all the rows that have the maximum years, in particular 2015/2016. So I write:
SELECT MAX( years ) , name
FROM teams
WHERE country = 'Italy'
AND league LIKE 'Serie A%'
But this query return the last row not all rows available.
I'm waiting this result=> Milan, Chievo
NB: THE TABLE VALUES IS JUST AN EXAMPLE