# Exercise 1

1. Create a Database named `IMDB`
2. Download the SQL file from [this link](https://arbrecreations-my.sharepoint.com/:u:/g/personal/mrinmais_arbre_in/EUF1TWUESkhIruCqyTw8NpoBB_9Ld2FFJm2JK76OydCOqQ?e=POeYlp) 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**&#x20;
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**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.consoleflare.com/t-sql-exercises/exercise-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
