I constantly bump up against this issue and am looking for a good
solution. I want a query that will return multiple rows, but only one
row per unique identifier in one field.
For instance, if I have the following table:
Name | Food | Eat_Date
Bob | Hot Dog | 2005-06-25
Jan | Pizza | 2005
I have three tables:
reviews
users
movies
I am trying to select the latest 4 reviews for DIFFERENT movies.
I can use the following query:
SELECT reviews.movies_id, movies.movie_title, users.name,
reviews.rating, reviews.post_d FROM reviews, users, movies WHERE
reviews.user_id = users.user_id a