Jump to content

Return row's with max (lastest) update time for a product


GregL83

Recommended Posts

Hey,

 

I am trying to return the latest comments for a product.  Each product could have multiple comments (rows), but I only want to return the latest comment (based off timestamp).  Here is an example:

 

  • prod_id  | comment  | time
  • -------------|--------------|--------------
  • 1            | a              | 1270018856
  • 1            | b              | 1270018801
  • 2            | c              | 1270018870

 

should return:

  • prod_id  | comment  | time
  • -------------|--------------|--------------
  • 1            | a              | 1270018856
  • 2            | c              | 1270018870

 

any help???? thanks :)

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.