Properly fix postgres behaviour for distinct on and annotation.
Properly fix postgres behaviour for distinct on and annotation.

learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,mrpau/kolibri