w3resource
SQL exercises

SQL exercises on movie Database: Find all the movies which released in the country other than UK

SQL movie Database: Subquery Exercise-3 with Solution

3. Write a query in SQL to list all the movies which released in the country other than UK.

Sample table: movie


Sample Solution:

SELECT mov_title, mov_year, mov_time, 
mov_dt_rel AS Date_of_Release, 
mov_rel_country AS Releasing_Country
FROM movie
WHERE mov_rel_country<>'UK';

Sample Output:

                     mov_title                      | mov_year | mov_time | date_of_release | releasing_country
----------------------------------------------------+----------+----------+-----------------+-------------------
 The Innocents                                      |     1961 |      100 | 1962-02-19      | SW
 Annie Hall                                         |     1977 |       93 | 1977-04-20      | USA
 Seven Samurai                                      |     1954 |      207 | 1954-04-26      | JP
(3 rows)

Practice Online


Movie database model

Query Visualization:

Duration:

Query visualization of Find all the movies which released in the country other than UK - Duration

Rows:

Query visualization of Find all the movies which released in the country other than UK - Rows

Cost:

Query visualization of Find all the movies which released in the country other than UK - Cost

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query in SQL to find the name of the director (first and last names) who directed a movie that casted a role for 'Eyes Wide Shut'.
Next: Write a query in SQL to find the movie title, year, date of release, director and actor for those movies which reviewer is unknown.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming