Ragnar Hojland Espinosa <ragnar(at)macula(dot)net> writes:> select template_id from cm_templates intersect select max(version) from> cm_templates group by (key);
Fixed. Thanks for the example.
regards, tom lane