Exercise 1

  1. Create a Database named IMDB

  2. Download the SQL file from this link and run the code present in it inside the IMDB database. (Make sure that the tables are created inside IMDB database only)

  3. Write an SQL statement to display all the records from the movies table

  4. Write an SQL statement to display the count of the rows in the movies table.

  5. Write an SQL statement to display all the genre values in the genre table in capital letters.

  6. Write an SQL statement to display all the records in the genre table that has an space in the genre value.

  7. Write an SQL statement to display all the records in the movies table in the movie names starting with ## and also ---

  8. Write an SQL statement to update all the movie names where the name starts with ## or also --- and remove the ## and ---

  9. Write an SQL statement to delete all the records in the genre table where the genre value is Invalid Genre

  10. Write an SQL statement to delete all the records where movie_id is 32217 and the genre is Sport

  11. Write an SQL statement to display all the records where domestic earning is greater than 100000 and worldwide earning is less than 9000000

Last updated