Code: Alles auswählen
ID Ort Geburtsdatum Gattung
=======================================
1 Bern 01.05.2009 Hund
2 Zürich 02.06.2009 Katze
3 Genf 05.06.2009 Maus
4 Bern 21.06.2009 Hund
5 Genf 10.06.2009 Maus
6 Genf 14.08.2009 Hund
2009-06_Gesamt:
Code: Alles auswählen
SELECT
"Ort", Ort COUNT("ID")
COUNT("ID") ==================
FROM Bern 2
"Tiere" --> Genf 3
WHERE Zürich 1
MONTH( "Geburtsdatum" ) = 6
GROUP BY
"Ort"
ORDER BY
"Ort" ASC
Code: Alles auswählen
SELECT
"Ort",
COUNT("ID")
FROM
"Tiere" Ort COUNT("ID")
WHERE ================
MONTH( "Geburtsdatum" ) = 6 AND "Gattung" = 'Hund' --> Bern 2
GROUP BY Genf 1
"Ort"
ORDER BY
"Ort" ASC
Code: Alles auswählen
SELECT
"2009-06_Gesamt"."Ort" AS "Ort"
COUNT("2009-06_Gesamt"."ID") AS "Gesamt",
COUNT("2009-06_Hund"."ID") AS "Hund",
FROM
"2009-06_Gesamt" INNER JOIN "2009-06_Hund",
ON "2009-06_Gesamt.Ort" = "2009-06_Hund.Ort"