ADATB/20241016/database.sql

27 lines
689 B
MySQL
Raw Normal View History

2024-10-16 06:31:17 +00:00
/*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;