sqltest.online Open in urlscan Pro
185.170.213.189  Public Scan

Submitted URL: http://airminumjelambar.lol/
Effective URL: https://sqltest.online/
Submission: On April 24 via api from LU — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

SQL code copied to buffer
Choose login method X



Login on the site is only required to save your progress. You can continue
testing without logging into the site.


SQLTEST


- SQL PRACTICE ONLINE

Here you can test your SQL knowledge, practice in SQL queries write and prepare
to job interview.

Donate
RU
Login
Group by:
complexity
category
database
SQL Basics
 1.  Get list of tables
 2.  Get the actors
 3.  Find addresses without postal code
 4.  Get the ordered list of languages
 5.  Get list of actors names
 6.  Get the languages list
 7.  Get an ordered list of movies
 8.  Get list of clients
 9.  Get a list of movie ratings
 10. Get the sorted list of films with limit
 11. Get the first 10 movies in alphabetical order
 12. Get films list third page
 13. Get a list of movies sorted by multiple fields
 14. Get the longest movie
 15. Find long movies
 16. Find stuff members by condition
 17. Find active customers
 18. Find the actors by name
 19. Find film names by description
 20. Get the sorted list of films with condition
 21. Find long comedies
 22. Select clients without the letter "A"
 23. Find adult only films about Database Administrator
 24. Find films about Dogs or Cats
 25. Get list of restricted films
 26. Get the restricted films list
 27. Find all employees works on the project
 28. Find foreign employees
 29. Find employees by hire date
 30. Find films with no available inventory
 31. Find languages films in which are missing
 32. Get a list of movies and their categories
 33. Extract address and domain from email
 34. Get table columns data
 35. Get list of indexes
 36. Find movies without cast records
 37. Find clients whose first name is the last name of another client
 38. Find clients who have met each other
 39. Find movies that have never been rented
 40. Find films in several categories

Calcualtions
 1. Calculate circle perimeter
 2. Calculate the area of a circle
 3. Calculate factorial
 4. Generate a list of movies in JSON format
 5. Find an addresses with even postal codes.
 6. Build a overal email list
 7. Generate monthly bill
 8. Build shared surnames list

Aggregation Functions
 1.  Find the average length of a movie
 2.  Find the minimal and maximal film rental cost
 3.  Find film average rental time
 4.  Find film average rental time
 5.  Find the number of employees
 6.  Find the number of films in each category
 7.  Find the average cost of renting a movie by category
 8.  Find minimum, maximum and average film duration
 9.  Find long movie categories
 10. Find the Most Rented Movie
 11. Find customers with the highest payment amounts
 12. Find film average rental time for each customer
 13. Analyze monthly payment
 14. Find movie distribution by store
 15. Find valuable employees
 16. Find the salary ratio
 17. Quarterly earnings analysis
 18. Find the countries with the most customers
 19. Find the count of rented disks
 20. Find the number of returns
 21. Get a list of actors - namesakes
 22. Get movie cast lists
 23. Find all the actors in the film
 24. Analyze weekly rentals
 25. Find repeat rentals
 26. Find movies available in one store only
 27. Find movies with no available copies
 28. Find the distribution of movies by category in JSON format

Subqueries
 1. Find addresses using sub-query
 2. Find clients who are not familiar with EMILY DEE films
 3. Find movies with the highest replacement cost
 4. Find movies with above-average rental rates
 5. Find clients with a higher than average number of rentals
 6. Find movies with rental time below average
 7. Find movies without cast records
 8. Find all actors never starred in adult only films

Common Table Expressions (CTE)
 1. Generate dates table
 2. Calculate the number of days off in a month
 3. Calculate factorial
 4. Average rentals count
 5. Find most active customers

WIndow Functions
 1.  Movie rental prices by category
 2.  Get rolling payment amounts
 3.  Find average disk idle time
 4.  Find the relative shares of each movie category
 5.  Get list of highly paid employees
 6.  Create a salary rating
 7.  Find movie popularity rating
 8.  Find customer details
 9.  Find EMILY DEE fans
 10. Find movies with the highest replacement cost
 11. Find the Horror films fans

Analytical queries
 1.  Find the average client activity time
 2.  Find the average revenue
 3.  Find the store average revenue
 4.  Analyze customer payments
 5.  Analyze monthly payment
 6.  Analyze monthly payments (2)
 7.  Find movie popularity rating
 8.  Find the count of rented disks
 9.  Find the number of returns
 10. Disc rental and return statistics
 11. Count the rental delays
 12. Calculate the percentage of delays
 13. Find the most diverse clients
 14. Find highly rated actors
 15. Find acting duets
 16. Find film distribution
 17. Find films that were out of stock
 18. Payments analyze
 19. Improve payments analyze
 20. Distribution of clients by weekday
 21. Improve distribution of clients by weekday
 22. Find the distribution of clients by time of day
 23. Find never been delayed films
 24. Find most delayed films
 25. Staff performance analysis
 26. Category popularity analysis
 27. Gap & Islands problem
 28. Find customers who sow same films

Data manipulation queries (DML)
 1. Create new address record
 2. Update the postal code
 3. Enter Woodridge postal code
 4. Update Canadian postal codes
 5. Enter new staff record
 6. Create customer addresses view
 7. Remove customer records
 8. Create department table
 9. Alter the staff table

Advertising income and donations are our only sources of funding to support the
project. Please do not disable advertising on the site or make a reasonable
donation.



Task 1:

Select all records from the actor table.


Write your request in the field below and click the "Check it!" button.

To write the answer, use MySQL syntax. Descriptions of the tables are given in
the right panel.

Copy code Clear editor
1

 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Get help Run query Check it! Next



SAKILA DB DESCRIPTION

Sakila DB ER diagram



The Sakila database contains 16 main tables describing various aspects of a DVD
rental company.

Below is a list of these tables:

Table actor

 * actor_id - Unique identifier for each actor.
 * first_name - First name of the actor.
 * last_name - Last name of the actor.
 * last_update - When the row was created or most recently updated.

actor_id first_name last_name last_update 1 John Doe 2023-01-01 12:00:00

Table film

 * film_id - Unique identifier for each film.
 * title - The title of the film.
 * description - A short description or plot summary of the film.
 * release_year - The year in which the movie was released.
 * language_id - Foreign key referencing the language table; identifies the
   language of the film.
 * original_language_id - A foreign key pointing at the language table;
   identifies the original language of the film. Used when a film has been
   dubbed into a new language.
 * rental_duration - The length of the rental period, in days.
 * rental_rate - The cost to rent the film for the period specified in the
   rental_duration column.
 * length - Duration of the film, in minutes.
 * replacement_cost - The amount charged to the customer if the film is not
   returned or is returned in a damaged state.
 * rating - The rating assigned to the film. Can be one of: G, PG, PG-13, R, or
   NC-17.
 * special_features - Lists which common special features are included on the
   DVD. Can be zero or more of: Trailers, Commentaries, Deleted Scenes, Behind
   the Scenes.
 * last_update - When the row was created or most recently updated.

film_id title description release_year language_id original_language_id
rental_duration rental_rate length replacement_cost rating special_features
last_update 1 Film Title A brief description of the film. 2000 1 2 5 4.99 120
19.99 PG-13 Trailers, Commentaries 2023-01-01 12:00:00

Table film_text

 * film_id - Unique identifier for each film.
 * title - Title of the film.
 * description - Description of the film.

film_id title description 1 Film Title A brief description of the film.

Table film_actor

 * actor_id - Unique identifier for actor.
 * film_id - Unique identifier for film.
 * last_update - When the row was created or most recently updated.

actor_id film_id last_update 1 1 2023-01-01 12:00:00

Table customer

 * customer_id - Unique identifier for each customer.
 * store_id - Foreign key referencing the store table.
 * first_name - First name of the customer.
 * last_name - Last name of the customer.
 * email - Email address of the customer.
 * address_id - Foreign key referencing the address table.
 * active - Indicates whether the customer is active.
 * create_date - Timestamp indicating when the customer was added to the
   database.
 * last_update - When the row was created or most recently updated.

customer_id store_id first_name last_name email address_id active create_date
last_update 1 1 John Doe john.doe@example.com 1 true 2023-01-01 12:00:00
2023-01-01 12:00:00

Table address

 * address_id - Unique identifier for each address.
 * address - Street address.
 * address2 - Additional address.
 * district - District or region.
 * city_id - Foreign key referencing the city table.
 * postal_code - Postal code.
 * phone - Phone number.
 * last_update - When the row was created or most recently updated.

address_id address address2 district city_id postal_code phone last_update 1 123
Main St [null] Downtown 1 12345 +1234567890 2023-01-01 12:00:00

Table city

 * city_id - Unique identifier for each city.
 * city - City name.
 * country_id - Foreign key referencing the country table.
 * last_update - When the row was created or most recently updated.

city_id city country_id last_update 1 Metropolis 1 2023-01-01 12:00:00

Table country

 * country_id - Unique identifier for each country.
 * country - Country name.
 * last_update - When the row was created or most recently updated.

country_id country last_update 1 United States 2023-01-01 12:00:00

Table category

 * category_id - Unique identifier for each category.
 * name - Name of the category.
 * last_update - When the row was created or most recently updated.

category_id name last_update 1 Action 2023-01-01 12:00:00

Table film_category

 * film_id - Unique identifier for each film.
 * category_id - Unique identifier for each category.
 * last_update - When the row was created or most recently updated.

film_id category_id last_update 1 1 2023-01-01 12:00:00

Table language

 * language_id - Unique identifier for each language.
 * name - Language name.
 * last_update - When the row was created or most recently updated.

language_id name last_update 1 English 2023-01-01 12:00:00

Table staff

 * staff_id - Unique identifier for each staff member.
 * first_name - First name of the staff member.
 * last_name - Last name of the staff member.
 * address_id - Foreign key referencing the address table.
 * picture - Staff member picture.
 * email - Email address of the staff member.
 * store_id - Foreign key referencing the store table.
 * active - Indicates whether the staff member is active.
 * username - Username for login.
 * password - Password for login.
 * last_update - When the row was created or most recently updated.

staff_id first_name last_name address_id picture email store_id active username
password last_update 1 John Doe 1 [null] john.doe@example.com 1 true johndoe
******** 2023-01-01 12:00:00

Table staff_list

 * ID - Unique identifier for each staff list entry.
 * name - Staff member's name.
 * address - Staff member's address.
 * zip code - Staff member's zip code.
 * phone - Staff member's phone number.
 * city - Staff member's city.
 * country - Staff member's country.
 * SID - Foreign key referencing the staff table.

ID name address zip code phone city country SID 1 John Doe 123 Main St 12345
+1234567890 Metropolis United States 1

Table store

 * store_id - Unique identifier for each store.
 * manager_staff_id - Foreign key referencing the staff table for the store
   manager.
 * address_id - Foreign key referencing the address table.
 * last_update - When the row was created or most recently updated.

store_id manager_staff_id address_id last_update 1 1 1 2023-01-01 12:00:00

Table payment

 * payment_id - Unique identifier for each payment.
 * customer_id - Foreign key referencing the customer table.
 * staff_id - Foreign key referencing the staff table.
 * rental_id - Foreign key referencing the rental table.
 * amount - Payment amount.
 * payment_date - Date of the payment.
 * last_update - When the row was created or most recently updated.

payment_id customer_id staff_id rental_id amount payment_date last_update 1 1 1
1 4.99 2023-01-01 12:13:14 2023-01-01 12:14:15

Table inventory

 * inventory_id - Unique identifier for each inventory item.
 * film_id - Unique identifier for each film in the inventory.
 * store_id - Unique identifier for the store where the inventory item is
   located.
 * last_update - When the row was created or most recently updated.

inventory_id film_id store_id last_update 1 23 2 2023-01-01 12:00:00

Table rental

 * rental_id - Unique identifier for each rental.
 * rental_date - Date when the rental occurred.
 * inventory_id - Foreign key referencing the inventory table.
 * customer_id - Foreign key referencing the customer table.
 * return_date - Date when the rental was returned.
 * staff_id - Foreign key referencing the staff table.
 * last_update - When the row was created or most recently updated.

rental_id rental_date inventory_id customer_id return_date staff_id last_update
1 2023-01-01 16:15:21 1 1 2023-01-10 09:12:36 1 2023-01-01 12:00:00

Have a questions? Ask in our telegram chat!
Like the site? Share it!
 * Telegram
 * Twitter
 * WhatsApp
 * LinkedIn
 * reddit

© 2023-2024 SQLtest.online About Privacy policy