I have a SQL query (sqlight3) that gives me tripels (name, value, date) of data.
select name, value, date from
"different things and conditions"
order by date desc
The result ist sorted by date and looks like this:
name | value | date
-------------------
a | x | 2015
b | y | 2014
a | z | 2013
b | x | 2012
c | y | 2011
Now I want the results filtered, so that every name is unique and I only get the newest (by date) triples. I expect the result
name | value | date
-------------------
a | x | 2015
b | y | 2014
c | y | 2011
How can I achive this?
Aucun commentaire:
Enregistrer un commentaire