From a19ce4ab6199102f5efa95577b365dcf3e9ca433 Mon Sep 17 00:00:00 2001 From: Abanoub Barayo <62501003+abanoubdev@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:44:43 +0200 Subject: [PATCH] Solved Lab --- actor_select.sql | 3 +++ actor_unique_last_name.sql | 3 +++ customer_select.sql | 3 +++ film_select.sql | 3 +++ film_title_select.sql | 3 +++ first_name_scarlett.sql | 3 +++ language_name_language_alias.sql | 3 +++ longest_10_films.sql | 3 +++ number_of_employees_count.sql | 5 +++++ release_year_distinct.sql | 3 +++ show_tables.sql | 3 +++ staff_first_name.sql | 3 +++ stores_count.sql | 3 +++ tota_inventory_count.sql | 3 +++ tota_rental_count.sql | 3 +++ 15 files changed, 47 insertions(+) create mode 100644 actor_select.sql create mode 100644 actor_unique_last_name.sql create mode 100644 customer_select.sql create mode 100644 film_select.sql create mode 100644 film_title_select.sql create mode 100644 first_name_scarlett.sql create mode 100644 language_name_language_alias.sql create mode 100644 longest_10_films.sql create mode 100644 number_of_employees_count.sql create mode 100644 release_year_distinct.sql create mode 100644 show_tables.sql create mode 100644 staff_first_name.sql create mode 100644 stores_count.sql create mode 100644 tota_inventory_count.sql create mode 100644 tota_rental_count.sql diff --git a/actor_select.sql b/actor_select.sql new file mode 100644 index 0000000..2f3cca5 --- /dev/null +++ b/actor_select.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT * FROM actor; \ No newline at end of file diff --git a/actor_unique_last_name.sql b/actor_unique_last_name.sql new file mode 100644 index 0000000..2059d01 --- /dev/null +++ b/actor_unique_last_name.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT COUNT(DISTINCT last_name) AS unique_last_name from actor; \ No newline at end of file diff --git a/customer_select.sql b/customer_select.sql new file mode 100644 index 0000000..3d5a12e --- /dev/null +++ b/customer_select.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT * FROM customer; \ No newline at end of file diff --git a/film_select.sql b/film_select.sql new file mode 100644 index 0000000..9a246d3 --- /dev/null +++ b/film_select.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT * FROM film; \ No newline at end of file diff --git a/film_title_select.sql b/film_title_select.sql new file mode 100644 index 0000000..877d256 --- /dev/null +++ b/film_title_select.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT title FROM film; \ No newline at end of file diff --git a/first_name_scarlett.sql b/first_name_scarlett.sql new file mode 100644 index 0000000..3d87959 --- /dev/null +++ b/first_name_scarlett.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT * FROM actor WHERE first_name='SCARLETT' \ No newline at end of file diff --git a/language_name_language_alias.sql b/language_name_language_alias.sql new file mode 100644 index 0000000..12d9cac --- /dev/null +++ b/language_name_language_alias.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT name as language FROM language; \ No newline at end of file diff --git a/longest_10_films.sql b/longest_10_films.sql new file mode 100644 index 0000000..2e4a9dd --- /dev/null +++ b/longest_10_films.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT title,film.length AS film_length from film order by film.length desc LIMIT 10; \ No newline at end of file diff --git a/number_of_employees_count.sql b/number_of_employees_count.sql new file mode 100644 index 0000000..a105981 --- /dev/null +++ b/number_of_employees_count.sql @@ -0,0 +1,5 @@ +USE sakila; + +SELECT count(*) as staff_count from staff; + + diff --git a/release_year_distinct.sql b/release_year_distinct.sql new file mode 100644 index 0000000..b5c6827 --- /dev/null +++ b/release_year_distinct.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT DISTINCT release_year FROM film; \ No newline at end of file diff --git a/show_tables.sql b/show_tables.sql new file mode 100644 index 0000000..88e3149 --- /dev/null +++ b/show_tables.sql @@ -0,0 +1,3 @@ +USE sakila; + +SHOW TABLES; \ No newline at end of file diff --git a/staff_first_name.sql b/staff_first_name.sql new file mode 100644 index 0000000..775eea6 --- /dev/null +++ b/staff_first_name.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT first_name FROM staff; \ No newline at end of file diff --git a/stores_count.sql b/stores_count.sql new file mode 100644 index 0000000..7830c80 --- /dev/null +++ b/stores_count.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT count(*) AS count from store; \ No newline at end of file diff --git a/tota_inventory_count.sql b/tota_inventory_count.sql new file mode 100644 index 0000000..7f36c13 --- /dev/null +++ b/tota_inventory_count.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT COUNT(*) AS total_inventory FROM inventory; \ No newline at end of file diff --git a/tota_rental_count.sql b/tota_rental_count.sql new file mode 100644 index 0000000..ac1755d --- /dev/null +++ b/tota_rental_count.sql @@ -0,0 +1,3 @@ +USE sakila; + +SELECT COUNT(*) AS total_rental FROM rental; \ No newline at end of file