Jump to content

Get latest entries of a defined row


Marcel1993

Recommended Posts

Hey guys,

 

I've got a table with the following contents:

 

CID  VALUE  TIME

1      A          500

1      B          700

1      C          400

2      D          100

2      E          300

3      F          100

 

Now I want to output this table without having entries with the same CID. If a entry got a unique CID it is supposed to get displayed. If several entries got the same CID, only the entry with the highest time is supposed to get displayed:

 

Example:

 

1      B          700

2      E          300

3      F          100

 

Is there a way to solve it in SQL?

 

Thanks :-)

Link to comment
https://forums.phpfreaks.com/topic/251686-get-latest-entries-of-a-defined-row/
Share on other sites

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.