aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-09-19 19:13:34 +0200
committerlonkaars <loek@pipeframe.xyz>2022-09-19 19:13:34 +0200
commitb378a12c0308951063f51d443d2e14e47e31c8da (patch)
treefbf43783ac4650a65ee53d27274cc7cc58747bfe
parent4956a132478cb219fbaf20b26b0268daa22b98c1 (diff)
alle huiswerk 4.x klaar
-rw-r--r--huiswerk.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/huiswerk.md b/huiswerk.md
index c62a7e6..044b9e3 100644
--- a/huiswerk.md
+++ b/huiswerk.md
@@ -84,6 +84,31 @@
|3.15 |`select activiteit.actomschr, sum(activiteit.prijs) as openstaand_bedrag from inschrijving inner join planning on planning.planningsnr = inschrijving.planningsnr inner join activiteit on activiteit.actcode = planning.actcode where inschrijving.betaald = 0 group by actomschr order by openstaand_bedrag desc;`|
|3.16 |[open vraag](#316)|
|3.17 |[open vraag](#317)|
+|4.01 |`select distinct student.naam from student left join belangstelling on belangstelling.studentnr = student.studentnr where belangstelling.studentnr is null;`|
+|4.02 |`select distinct student.naam from belangstelling right join student on student.studentnr = belangstelling.studentnr where belangstelling.studentnr is null;`|
+|4.03 |`select distinct actomschr from activiteit left join belangstelling on belangstelling.actcode = activiteit.actcode where studentnr is null;`|
+|4.04 |`select omschrijving, count(studentnr) as aantal from opleiding left join student on student.oplcode = opleiding.oplcode group by omschrijving;`|
+|4.05 |`select academie, count(belangstelling.studentnr) as aantal_inschrijvingen from opleiding left join student on student.oplcode = opleiding.oplcode left join belangstelling on belangstelling.studentnr = student.studentnr where opleiding.academie is not null group by academie;`|
+|4.06 |`select * from inschrijving left join beschikbaar on beschikbaar.datum = inschrijving.datum union all select * from inschrijving right join beschikbaar on beschikbaar.datum = inschrijving.datum;`|
+|4.07 |`select week(date("20120917"));`|
+|4.08 |`select datediff(max(datum), min(datum)) as aantal_dagen_ertussen, max(datum) as maximum_datum, min(datum) as minimum_datum from planning;`|
+|4.09 |`select to_char(now(), "DD-MM-YYYY") as NL_notatie;`|
+|4.10 |`select * from stuk where genrenaam = "klassiek" or jaartal > 1980;`|
+|4.11 |`select * from stuk where genrenaam = "pop" or (speelduur < 5 and niveaucode = "A");`|
+|4.12 |`select * from stuk where niveaucode in("A", "B") and genrenaam != "pop" and speelduur <= 8;`|
+|4.13 |`select stuknr, titel, genrenaam, niveaucode from stuk where (niveaucode in ("B", "C") or niveaucode is null) and genrenaam = "klassiek";`|
+|4.14 |`select stuknr, titel, genrenaam, niveaucode from stuk where niveaucode is not null order by niveaucode desc, genrenaam;`|
+|4.15 |`select count(distinct niveaucode) as aantal from stuk;`|
+|4.16 |`select genrenaam, count(genrenaam) as aantal from stuk where niveaucode in("A", "B") group by genrenaam having aantal > 1;`|
+|4.17 |`select genrenaam, count(genrenaam) as aantal from stuk where jaartal > 1900 group by genrenaam having aantal >= 3;`|
+|4.18 |`select genrenaam, count(genrenaam) as aantal, avg(speelduur) as gemiddelde from stuk where niveaucode is not null group by genrenaam;`|
+|4.19 |`select genrenaam, niveaucode, count(stuknr) as aantal from stuk where niveaucode in("A", "B") group by genrenaam, niveaucode having aantal > 1;`|
+|4.20 |`select naam, titel from stuk inner join componist on stuk.componistId = componist.componistId;`|
+|4.21 |`select stuknr, speelduur, omschrijving from stuk left join niveau on niveau.niveaucode = stuk.niveaucode where genrenaam = "klassiek";`|
+|4.22 |`select componist.naam, muziekschool.plaatsnaam from componist left join muziekschool on muziekschool.schoolId = componist.schoolId where year(geboortedatum) >= 1900;`|
+|4.23 |`select stuknr, titel, componist.naam, niveau.omschrijving from stuk left join componist on stuk.componistId = componist.componistId left join niveau on niveau.niveaucode = stuk.niveaucode where omschrijving is not null;`|
+|4.24 |`select niveau.omschrijving, stuk.niveaucode, count(stuknr) from stuk left join niveau on niveau.niveaucode = stuk.niveaucode group by niveaucode having niveaucode is not null;`|
+|4.25 |`select instrument.instrumentnaam, instrument.toonhoogte from instrument left join stukinstrument on (stukinstrument.instrumentnaam = instrument.instrumentnaam and stukinstrument.toonhoogte = instrument.toonhoogte) where stuknr is null;`|
## 1.07