Relationale Tabelle SQL Plus
(1) Create a relational table TOTAPPS(anum,totap) that contains information
about the numbers of applicants (anum) and the total number
of applications (totap) submitted by each applicant. If an applicant submitted
no application then a value ofattribute
totap should be equal to zero. Load data to a relational table TOTAPPS.
Deshalb möchte ich nur verstehen, dass die relationale Tabelle folgende Abfrage nicht verwendet
CREATE TABLE test_table ( anum INTEGER, totap INTEGER );
und wie zeige ich den Anum, um die Anzahl der Bewerber anhand der relationalen Tabelle zu zählen
Beispiel meine Bewerber-Tabelle wie folgt:
//Applicant
A#
---------
1
2
3
4
5
//Application
A# POSITION
--------------------
1 CEO
1 GM
2 DIRECTOR
3 MANAGER
Wenn ich also * FROM TOTAPPS auswähle, sollte das folgende Ergebnis so aussehen:
//TOTAPPS
ANUM TOTAP
-------------------
1 2
2 1
3 1
4 0
5 0
ich muss manuell einfügen oder wenn ich die relationale Tabelle erstelle, kann ich sie gerade zählen?