bruh
This commit is contained in:
parent
9c3e0b0903
commit
f34caa8b11
|
@ -12,7 +12,8 @@ SELECT count(autok.id) as `sportautok-szama`
|
|||
***
|
||||
17. feladat
|
||||
|
||||
SELECT autok.nev, autok.szin FROM autok
|
||||
SELECT autok.nev, autok.szin
|
||||
FROM autok
|
||||
INNER JOIN kategoriak ON autok.kategoriaId = kategoriak.id
|
||||
WHERE kategoriak.nev = "Limuzin"
|
||||
ORDER BY trim(autok.nev) ASC;
|
||||
|
@ -26,8 +27,9 @@ INSERT INTO autok (rendszam, szin, kategoriaId, nev, evjarat, ar) VALUES
|
|||
***
|
||||
19. feladat
|
||||
|
||||
SELECT autok.nev, sum(berlesek.mennyiseg) AS `mennyiseg` FROM berlesek
|
||||
INNER JOIN autok WHERE autok.id = berlesek.autoId
|
||||
SELECT autok.nev, sum(berlesek.mennyiseg) AS `mennyiseg`
|
||||
FROM berlesek
|
||||
INNER JOIN autok ON autok.id = berlesek.autoId
|
||||
GROUP BY autok.id
|
||||
ORDER BY `mennyiseg` DESC
|
||||
LIMIT 5;
|
||||
|
|
Loading…
Reference in New Issue
Block a user