Files
sql/banque/banque.4.bak

9 lines
264 B
Groff
Raw Permalink Normal View History

2025-11-14 07:32:20 +01:00
select h.id, h.type, case h.type
when 'PERSON' then p.firstname || ' ' || p.lastname
when 'COMPANY' then c.name
when 'BANK' then b.name
end
from holder h
left join person p on p.id = h.id
left join company c on c.id = h.id
left join bank b on b.id = h.id