Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

w4 lab2 done #328

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions lab2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#2
SELECT * FROM sakila.actor;
SELECT * FROM sakila.film;
SELECT * FROM sakila.customer;
#3
SELECT title FROM sakila.film;
SELECT name as language FROM sakila.language;
SELECT first_name FROM sakila.staff;
#4
SELECT DISTINCT release_year FROM sakila.film;
#5
SELECT COUNT(DISTINCT store_id) FROM sakila.store;
SELECT COUNT(DISTINCT staff_id) FROM sakila.staff;
SELECT COUNT(*) FROM sakila.film;
SELECT COUNT(*) FROM sakila.rental;
SELECT DISTINCT last_name FROM sakila.actor;
#6
SELECT title FROM sakila.film
ORDER BY length desc
LIMIT 10;
#7
SELECT * FROM sakila.actor
WHERE first_name = "Scarlett";
#BONUS
SELECT * FROM sakila.film
WHERE title LIKE '%ARMAGEDDON%' and length > 100;
SELECT COUNT(*) FROM sakila.film
WHERE special_features = "behind the scenes";