All pastes #210933 Raw Edit

Stuff

public text v1 · immutable
#210933 ·published 2006-10-20 02:37 UTC
rendered paste body
I have two tables:

#Favorites#
content_type_id (INT)
object_id (INT)
^unique together^

#ChangeLog#
content_type_id (INT)
object_id (INT)
<some other fields>
change_time (DATETIME)

I want to select all from favorites, and join them with changelog, order the changelog descending, and then group it.