20240904
This commit is contained in:
parent
896934176c
commit
ab2838e425
BIN
Adatbázis/Thumbs.db
Normal file
BIN
Adatbázis/Thumbs.db
Normal file
Binary file not shown.
3432
Adatbázis/adatbazis.sql
Normal file
3432
Adatbázis/adatbazis.sql
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Adatbázis/feladat.PNG
Normal file
BIN
Adatbázis/feladat.PNG
Normal file
Binary file not shown.
After Width: | Height: | Size: 189 KiB |
19
Adatbázis/oaraimuri.txt
Normal file
19
Adatbázis/oaraimuri.txt
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
13. Feladat
|
||||||
|
CREATE DATABASE parkolohaz CHARACTER SET utf8 COLLATE utf8_hungarian_ci;
|
||||||
|
14. Feladat
|
||||||
|
Bemásoltam a kódokat
|
||||||
|
15. Feladat
|
||||||
|
SELECT COUNT(parkolohely.szelesseg) AS 'masfeles_parkolohelyek_szama' from parkolohely WHERE parkolohely.szelesseg = 1.5;
|
||||||
|
16.Feladat
|
||||||
|
INSERT INTO jarmutipus(jarmutipus.nev) VALUES("Elektromos gépjármű");
|
||||||
|
UPDATE parkolohely SET parkolohely.jarmutipusId = 4 WHERE parkolohely.felirat = "P001";
|
||||||
|
17.Feladat
|
||||||
|
SELECT foglalas.datum, foglalas.ar FROM foglalas
|
||||||
|
INNER JOIN felhasznalo ON foglalas.felhasznaloId = felhasznalo.id
|
||||||
|
WHERE felhasznalo.nev = "Kovács Anna";
|
||||||
|
18.Feladat
|
||||||
|
SELECT felhasznalo.nev, SUM(foglalas.ar) AS 'szumma_tartozas' FROM foglalas
|
||||||
|
INNER JOIN parkolohely ON parkolohelyId = parkolohely.id
|
||||||
|
INNER JOIN jarmutipus ON parkolohely.jarmutipusId = jarmutipus.id
|
||||||
|
INNER JOIN felhasznalo ON felhasznalo.id = foglalas.felhasznaloId
|
||||||
|
WHERE jarmutipus.nev = "Motorkerékpár" AND foglalas.fizetve = FALSE GROUP BY felhasznalo.nev ORDER BY SUM(foglalas.ar) DESC LIMIT 1;
|
Loading…
Reference in New Issue
Block a user