finished
This commit is contained in:
parent
3ca92f830c
commit
95a50296a4
|
@ -21,7 +21,19 @@ UPDATE film SET cim = "Csillagok között" WHERE cim = "Interstellar";
|
||||||
INSERT INTO filmtipus(nev) VALUES("Animációs");
|
INSERT INTO filmtipus(nev) VALUES("Animációs");
|
||||||
|
|
||||||
/*Feladat 19*/
|
/*Feladat 19*/
|
||||||
SELECT COUNT(jegy.id) AS `jegy_db` FROM jegy
|
SELECT vendeg.nev AS `nev`,
|
||||||
|
COUNT(jegy.id) AS `teljes_aru_jegy_db` FROM jegy
|
||||||
INNER JOIN vendeg ON vendeg.id = jegy.vendegId
|
INNER JOIN vendeg ON vendeg.id = jegy.vendegId
|
||||||
WHERE vendeg.nev LIKE "Fodor András"
|
WHERE vendeg.nev LIKE "Fodor András"
|
||||||
AND jegy.kedvezmeny IS 0;
|
AND jegy.kedvezmeny = 0;
|
||||||
|
|
||||||
|
/*Feladat 20*/
|
||||||
|
|
||||||
|
SELECT film.cim AS `film_neve`,
|
||||||
|
COUNT(jegy.id) AS `jegy_darabszam`,
|
||||||
|
SUM(film.jegyar - (film.jegyar * (jegy.kedvezmeny / 100))) AS `teljes_bevetel`
|
||||||
|
FROM vetites
|
||||||
|
INNER JOIN jegy ON jegy.vetitesId = vetites.id
|
||||||
|
INNER JOIN film ON film.id = vetites.filmId
|
||||||
|
GROUP BY film.id
|
||||||
|
ORDER BY `teljes_bevetel` DESC LIMIT 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user