aboutsummaryrefslogtreecommitdiff
path: root/eindopdracht/q8.sql
blob: 4a1151a665d3cdf6a0616bd4e16daf35d3ffb0ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
create or replace view NFS_Excel as
select
	Merk.Naam as "Merk",
	`Type`.Naam as "Type",
	round(`Type`.Vermogen * 1.3637) as "Vermogen [pk]",
	`Type`.Vermogen as "Vermogen [kW]",
	concat(Locatie.Naam, ", ", Land.Naam) as "Hoofdkantoor"
from `Type`
left join Merk on Merk.ID = `Type`.MerkID
left join Hoofdkantoor on Hoofdkantoor.MerkID = Merk.ID
left join Locatie on Locatie.ID = Hoofdkantoor.LocatieID
left join Land on Land.ID = Locatie.LandID;