Repository navigation
Expand file tree
/
Copy pathinput.sql
More file actions
35 lines (29 loc) · 2.01 KB
/
Copy pathinput.sql
File metadata and controls
35 lines (29 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-- Seance: (film, salle, horaire)
-- Film: (titre,realisateur)
-- Cinema: (nom,adresse, nb_salles)
CREATE TABLE Cinema (nom TEXT, adresse TEXT, nb_salles INT)
CREATE TABLE Seance (film TEXT, salle TEXT, horaire INT)
CREATE TABLE Film (titre TEXT, realisateur TEXT, duree INT)
INSERT INTO Cinema (nom, adresse, nb_salles) VALUES ("Le Champo", "Rue des écoles", 4)
INSERT INTO Cinema (nom, adresse, nb_salles) VALUES ("La filmo", "Rue de Jacque Tati", 1)
INSERT INTO Cinema (nom, adresse, nb_salles) VALUES ("Mk2 Odeon", "Place Odeon", 6)
INSERT INTO Film (titre,realisateur,duree) VALUES ("Luigi", "Patrick", 500)
INSERT INTO Film (titre,realisateur,duree) VALUES ("Mario", "Patrick", 1000)
INSERT INTO Film (titre,realisateur,duree) VALUES ("StarWars 1", "Lucas", 3000)
INSERT INTO Film (titre,realisateur,duree) VALUES ("StarWars 2", "Lucas' son", 478)
INSERT INTO Film (titre,realisateur,duree) VALUES ("Me, Myself and I", "Hubert", 1000)
INSERT INTO Seance (film, salle, horaire) VALUES ("Mario", "Le Champo", 3)
INSERT INTO Seance (film, salle, horaire) VALUES ("Mario", "Le Champo", 5)
INSERT INTO Seance (film, salle, horaire) VALUES ("Mario", "La filmo", 3)
INSERT INTO Seance (film, salle, horaire) VALUES ("Luigi", "La filmo", 1)
INSERT INTO Seance (film, salle, horaire) VALUES ("Luigi", "Mk2 Odeon", 0)
INSERT INTO Seance (film, salle, horaire) VALUES ("StarWars 1", "La filmo", 7)
INSERT INTO Seance (film, salle, horaire) VALUES ("StarWars 1", "Mk2 Odeon", 6)
INSERT INTO Seance (film, salle, horaire) VALUES ("StarWars 1", "Mk2 Odeon", 10)
INSERT INTO Seance (film, salle, horaire) VALUES ("StarWars 2", "Mk2 Odeon", 8)
INSERT INTO Seance (film, salle, horaire) VALUES ("Me, Myself and I", "Le Champo", 8)
INSERT INTO Seance (film, salle, horaire) VALUES ("Me, Myself and I", "Mk2 Odeon", 9)
INSERT INTO Seance (film, salle, horaire) VALUES ("Me, Myself and I", "La filmo", 7)
-- SELECT Seance.film FROM Seance
-- SELECT Seance.film FROM Seance
SELECT Seance.film FROM Seance WHERE (NOT Seance.film = "Luigi") AND Seance.salle = "Le Champo"