
Action Movies
Paulo R. Rodegheri Brazil
A video store contractor hired her services to catalog her movies. They need you to select the code and the name of the movies whose description of the genre is 'Action'.
Schema
Column | Type |
id (PK) | numeric |
name | varchar |
id_genres (FK) | numeric |
Column | Type |
id (PK) | numeric |
description | varchar |
Tables
id | name | id_genres |
1 | Batman | 3 |
2 | The Battle of the Dark River | 3 |
3 | White Duck | 1 |
4 | Breaking Barriers | 4 |
5 | The Two Hours | 2 |
id | description |
1 | Animation |
2 | Horror |
3 | Action |
4 | Drama |
5 | Comedy |
Output Sample
id | name |
1 | Batman |
2 | The Battle of the Dark River |
N.B.: It's better if you solve this by your own. Thank you!
URI - BEECROWD Online Judge 2611 Solve in SQL:
-- Solved by IntesarSELECT m.id, m.nameFROM movies m, genres gWHERE g.description = 'Action' AND g.id = m.id_genres;
0 Comments