vues
This commit is contained in:
9
banque/banque.4.sql
Normal file
9
banque/banque.4.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
Reference in New Issue
Block a user