All pastes #88872 Raw Edit

Someone

public text v1 · immutable
#88872 ·published 2006-07-15 12:30 UTC
rendered paste body
SELECT *  FROM `views`  ORDER BY FilmFkey


// this returns: 
2 (ViewPkey) - 15 (FilmFkey) - 2006-07-12 (date)
3 - 15 - date
5 - 15 - date
9 - 22 - date
10- 22 - date
// and so on

I want to only select one row for each film, no matter how many times it appears, or no matter the other values in the row (VIewPkey or date). Like:
ViewPkey - 15  - the_most_recent_date
ViewPkey - 22 - the_most_recent_date