ConsoleFlare
  • Python
    • Python Installation
    • Pandas and SQL
  • Projects
    • Data Analytics Project
      • Courier Analytics Challenge
      • Solution
    • Skytrax Airline Review Analysis Pipeline
      • Setting up Azure SQL Database
      • SkyTrax Web Scraping
  • Reporting
    • Power BI
      • Installation
      • Data Sources
      • Important Links
  • PySpark & Databricks
    • Spark vs Hadoop
    • Cluster Computing
    • PySpark
    • Databricks Introduction
    • PySpark in Databricks
    • Reading Data with PySpark
    • PySpark Transformation Methods
    • Handling Duplicate Data
    • PySpark Action Methods
    • PySpark Native Functions
    • Partitioning
    • Bucketing
    • Partitioning vs Bucketing
  • Live Data Streaming
    • Spark Streaming
      • Installation Issues
      • Jupyter Notebook Setup
  • Data Pipeline
    • Azure Data Factory
  • Blockchain
    • Smart Contract Guide
      • Setting up a Node project
      • Developing smart contracts
  • Interview Questions
    • SQL Interview Questions
    • Power BI Interview Questions
  • T-SQL Exercises
    • Exercise 0
    • Exercise 1
    • Exercise 2
    • Exercise 3
  • CHEAT SHEET
    • Ultimate SQL Server Cheat Sheet
Powered by GitBook
On this page

Was this helpful?

  1. T-SQL Exercises

Exercise 1

PreviousExercise 0NextExercise 2

Last updated 5 months ago

Was this helpful?

  1. Create a Database named IMDB

  2. Download the SQL file from 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

this link