Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT cr1.entity_id, cr1.user_id, cr1.value
- FROM core_rating cr1
- where cr1.timestamp=(select max(cr2.timestamp) from core_rating cr2 where cr1.user_id = cr2.user_id)
- GROUP BY cr1.entity_id, cr1.user_id, DATE_FORMAT(cr1.timestamp, '%Y-%m-%d %h:%i:00')
- order by cr1.timestamp
Add Comment
Please, Sign In to add comment