aboutsummaryrefslogtreecommitdiff
path: root/eindopdracht/q8.sql
diff options
context:
space:
mode:
Diffstat (limited to 'eindopdracht/q8.sql')
-rw-r--r--eindopdracht/q8.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/eindopdracht/q8.sql b/eindopdracht/q8.sql
new file mode 100644
index 0000000..4a1151a
--- /dev/null
+++ b/eindopdracht/q8.sql
@@ -0,0 +1,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;