aboutsummaryrefslogtreecommitdiff
path: root/eindopdracht/t9.sql
diff options
context:
space:
mode:
Diffstat (limited to 'eindopdracht/t9.sql')
-rw-r--r--eindopdracht/t9.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/eindopdracht/t9.sql b/eindopdracht/t9.sql
new file mode 100644
index 0000000..6c72b90
--- /dev/null
+++ b/eindopdracht/t9.sql
@@ -0,0 +1,9 @@
+select
+ Land.Naam,
+ count(`Type`.ID) as "Aantal types"
+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
+group by Land.ID;