Jump to content

[SOLVED] sql to get most recent unique rows


AmandaBTO

Recommended Posts

An example of my data

 

id - name - img - date

88 - Transformers: The Complete Series - 51NkgXkcBdL.jpg - 2009-10-17 11:42:27

89 - Transformers: Revenge of the Fallen - 613JpLLDqXL.jpg - 2009-10-17 11:44:24

90 - I Love You Man - 51JCT4GYZuL.jpg - 2009-10-17 12:15:32

91 - Transformers: Revenge of the Fallen - 613JpLLDqXL.jpg - 2009-10-17 12:58:08

92 - Transformers: Revenge of the Fallen - 613JpLLDqXL.jpg - 2009-10-17 12:58:09

93 - Transformers: Revenge of the Fallen - 613JpLLDqXL.jpg - 2009-10-17 12:58:10

 

I know how to select the 3 most recent rows

SELECT * FROM table ORDER BY date DESC LIMIT 3

 

But how can I get the 3 most recent unique (except for date) rows?  I've been playing all morning and I'm either really close to figuring it out or I'm completely off.

 

Thanks

Amanda

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.