
Untitled
By: a guest on
May 21st, 2012 | syntax:
None | size: 0.52 KB | hits: 18 | expires: Never
SELECT DISTINCT ON (ra.release)
created.created, annotation_append(annotation.text)
FROM annotation,
(
SELECT created
FROM annotation an
JOIN release_annotation ra ON ra.annotation = an.id
WHERE ra.release IN (14540, 14541, 14542)
) created,
release_annotation ra
WHERE ra.annotation = annotation.id
AND annotation.created <= created.created
AND ra.release IN (14540,14541,14542)
GROUP BY created.created;