Aufgabe 2.3¶

« Fragen-Übersicht zum SQL-Coach
Bestimmen Sie die Anzahl der Mitarbeiter pro Projekt
absteigend sortiert nach der Mitarbeiterzahl!
Hinweis: hier wird ein Join benötigt
Die Struktur der Datenbank¶
ABTEILUNG ( ABTNR , ABTNAME , BUDGET , CHEFNR ) CHEFNR » PERSONAL.PERSNR
AKTE ( PERSNR , DATUM , POSITION , GEHALT ) PERSNR » PERSONAL.PERSNR
PERSONAL ( PERSNR , VNAME , NNAME , PROJNR , TELEFONNR , GEHALT ) PROJNR » PROJEKT.PROJNR
PROJEKT ( PROJNR , BUDGET , ABTNR ) ABTNR » ABTEILUNG.ABTNR
Antwort?¶
???
Das gesuchte Ergebnis:
projnr | anzahl
--------+--------
1 | 6
4 | 5
3 | 4
7 | 3
23 | 2
6 | 2
2 | 1
(7 rows)