From 5dbb26894f29819547bb4a69394670b57bcf662a Mon Sep 17 00:00:00 2001 From: Jorgehernandez231 Date: Tue, 19 Aug 2025 18:03:31 +0200 Subject: [PATCH] done --- 1.sql | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 1.sql diff --git a/1.sql b/1.sql new file mode 100644 index 0000000..6599960 --- /dev/null +++ b/1.sql @@ -0,0 +1,36 @@ +use sakila; + +select * from actor; +select * from film; +select * from customer; + +select titles from film; +select name as aliased from language; +select first_name from staff; + +select distinct release_year from film; + +select count(store_id) from store; +select count(staff_id) from staff; + +SELECT + COUNT(*) AS currently_rented, + (SELECT COUNT(*) FROM inventory) - COUNT(*) AS currently_available +FROM rental +WHERE return_date IS NULL; + +SELECT COUNT(DISTINCT last_name) AS distinct_last_names +FROM actor; + +select * from film +order by length desc +limit 10; + +select * from actor +where first_name = "SCARLETT"; + +select * from film +where special like '%ARMAGEDDON%' and length > 100; + +select count(*) from film +where special_features like '%Behind the Scenes%'; \ No newline at end of file