SQL Tasks
⚡ You can solve SQL problems as a guest or log in with your Google account!
Pick Two Columns
Retrieve both the title and director of each Oscar movie.
Get Oscar Movie Directors
Retrieve only the director of every movie in the oscar_movies table.
View All Oscar Movie Data
Retrieve all information about each Oscar movie using the asterisk wildcard.
Get Oscar Movie Titles
Retrieve only the title of every movie in the oscar_movies table.
Choose Three Columns
Retrieve the title, genre, and year of each Oscar movie.
Movies After 2000
Find all movies released after the year 2000.
Find Specific Director
Find the movie with the director 'James Cameron'.
Movies Between Years
Find movies that won Oscars between 2000 and 2013.
Drama Movies Only
Find all movies that belong to the genre 'Drama' and were released after 2000.
Exclude Certain Years
Find Oscar Movies with release years not between 1995 and 2007.
Sort Movies Alphabetically
List the first five movies alphabetically by title.
Get Top Movies Only
Show only the first 3 movies when sorted by title.
Find Unique Directors
List all unique directors in the oscar_movies table.
Sort Movies by Newest
Show the last four movies released, starting with the newest one.
Skip and Show Movies
Show the next five movies in alphabetical order after skipping the first 5.
Find Old Universities
Find all universities founded before 1850.
UK Universities Only
Show all UK universities with more than 20,000 students, sorted by student count from largest to smallest.
List Unique Countries
Show all unique countries that have top universities, sorted alphabetically.
Get University Countries
Retrieve only the country of every university in the top_universities table.
Largest Universities
Find the 3 universities with the most students, showing their name, country, and student count.
Show Books with Authors
Retrieve the title of each book along with the author's first and last name.
Get Book Publication Details
Show the book title, author's full name, and publication year for all books.
Find UK Author Books
Find all books written by authors from the UK, showing the book title and author's last name.
Recent Books Only
Show the 5 most recently published books with author last names, sorted from newest to oldest.
Sort Books by Author Country
Display book titles with author names, sorted alphabetically by the author's country.
Find Orders Without Companies
Find all orders that don't have company information assigned, showing order number and amount.
Show All Companies and Orders
Display every company along with their orders. Include companies even if they haven't placed any orders.
Count Orders Per Company
Show each company's name and the total count of their orders, including companies with zero orders.
Find Companies Without Orders
Find all companies that haven't placed any orders yet, showing only company names and industries.
Show All Orders with Companies
Display every order with company information. Include orders even if company data is missing.
Calculate Euro Conversion
Show order amounts in USD and convert to Euros using exchange rate 0.85.
Format Company Information
Display company names in original format, uppercase format, and lowercase format using aliases.
Calculate Order Values with Tax
Show order numbers with their original amounts and calculated amounts including 10% tax.
List Companies with Order Details
Show company names, countries, order numbers, and order amounts using table aliases (c for companies, o for orders).
Calculate Company Age
Show company names and calculate how many years old each company is (use 2025 as current year).
Find Price Range
Find the highest and lowest individual product prices in the sales data.
Calculate Average Quantity
Find the average quantity of items sold per transaction.
Sales Summary Report
Show total sales count, total revenue, average price, minimum quantity, and maximum quantity in one query.
Calculate Total Revenue
Calculate the total revenue by multiplying quantity by price for all sales.
Count Total Sales
Find the total number of sales transactions in the database.
Count Sales by Region
Show each customer region and the total number of sales in that region.
High-Volume Categories Only
Find product categories that have more than 5 total sales, showing category name and sales count.
Revenue by Product Category
Display each product category and its total revenue (quantity × price) using data from both tables.
Average Sale Amount by Region
Show each customer region with the average sale amount (quantity × price) for that region.
Profitable Suppliers Analysis
Show suppliers with total profit over $1000, displaying supplier name, country, and total profit (selling price - cost price).