Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Cinema for Mary | Ordering Data
Practice SQL with Cinema Database

book
Cinema for Mary

Uppgift

Swipe to start coding

Mary wants to watch a movie of genres Fantasy or Comedy and with rating >= 7.0. Help her to find cinemas that she could visit according to her preferences. Output the list as the column called cinema in lexicographical order.

Lösning

select distinct c.label as cinema
from schedule as s
inner join movie as m on m.id=s.movie_id
inner join genre as g on m.genre_id=g.id
inner join cinema as c on s.cinema_id=c.id
where rating>=7 and (g.label='Fantasy' or g.label='Comedy')
order by cinema

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 1

Query ResultQuery Result
No query executed yet...

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

We use cookies to make your experience better!
some-alt