ADATB/20241016/database.sql
szabomarton 3ca92f830c asd
2024-10-16 08:31:17 +02:00

27 lines
689 B
SQL

/*Feladat 13*/
CREATE DATABASE mozi CHARACTER SET = "utf8" COLLATE = "utf8_hungarian_ci";
/*Feladat 14*/
/*Feladat 15*/
SELECT * FROM vetites
WHERE kezdes LIKE "20:00:00";
/*Feladat 16*/
SELECT vendeg.nev AS `vendeg_nev`,
COUNT(jegy.id) AS `jegy_db` FROM jegy
INNER JOIN vendeg ON vendeg.id = jegy.vendegId
GROUP BY `vendeg_nev`
ORDER BY `jegy_db` DESC LIMIT 5;
/*Feladat 17*/
UPDATE film SET cim = "Csillagok között" WHERE cim = "Interstellar";
/*Feladat 18*/
INSERT INTO filmtipus(nev) VALUES("Animációs");
/*Feladat 19*/
SELECT COUNT(jegy.id) AS `jegy_db` FROM jegy
INNER JOIN vendeg ON vendeg.id = jegy.vendegId
WHERE vendeg.nev LIKE "Fodor András"
AND jegy.kedvezmeny IS 0;