Код: Выделить всё
select single(f.filename), d.id from document d left join document_file f on f.document_id = d.id group by d.idКак этого добиться?
Подробнее здесь: https://stackoverflow.com/questions/798 ... om-a-group
Код: Выделить всё
select single(f.filename), d.id from document d left join document_file f on f.document_id = d.id group by d.id