आप max()
लागू कर सकते हैं ID
. के साथ कुल मिलाकर कॉलम और फिर GROUP BY
बाकी:
select max(id) id, SATELLITE_ID, ATT_TYPE_ID, TIME, Roll, Pitch, yaw
from attitude
group by SATELLITE_ID, ATT_TYPE_ID, TIME, Roll, Pitch, yaw
order by id
देखें SQL Fiddle with Demo
परिणाम:
| ID | SATELLITE_ID | ATT_TYPE_ID | TIME | ROLL | PITCH | YAW |
---------------------------------------------------------------
| 2 | 1 | 1 | 2012 | 1 | 2 | 1 |
| 3 | 1 | 1 | 2011 | 1 | 2 | 1 |