I have a table that has data that looks something like this:
data_type, value, datetime
World of Warcraft, 500, 2012-12-02
Quake 3, 1500, 2013-12-02
Quake 3, 1400, 2013-02-04
World of Warcraft, 1200, 2013-05-20
Final Fantasy, 100, 2013-02-03
Final Fantasy, 500, 2013-03-05
What I want to select is something like the following:
data_type, value World of Warcraft, 1200 Quake 3, 1500 Final Fantasy, 500
select
most recent value for 'World of Warcraft',
most recent value for 'Quake 3',
most recent value for 'Final Fantasy'
So I get the most recent value of each of these in a single statement rather than having to separate them out. How would I go about doing this?