Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submit your code in text form by pasting it into the submission text box -- do not submit a file . To started with SQL

Submit your code in text form by pasting it into the submission text box--do not submit a file.

To started with SQL and for general SQL language reference, go to https://www.w3schools.com/sql Links to an external site.

General form of a SELECT statement: SELECT field(s) FROM table(s) WHERE condition(s);

Use the interactive SQL sandbox at https://sql.profammons.com Links to an external site.with Chrome or Edge (not Firefox or Safari).

Select Sakila from the schema dropdown on the right pane.

Write SELECT queries to show the requested data for each of the items below:

Show the last_name and first_name for every actor in the actor table.

Show the title of all films in the film table with a length less than or equal to 60 minutes. (hint: WHERE clause)

Show the title of all films from film_list with categories Documentary and Horror. (use a WHERE clause)

Show the title, price and length of all films in the film_list that start with "Co". (use a WHERE clause)

Show the title and price of all films in film_list with category Horror--and sort by the price from largest to smallest (descending order). (use an ORDER BY clause)

Show the title, description, and rating of films that have "new" anywhere in the title. (hint: LIKE clause inside WHERE)

Show the title and price per minute (length) for films in the category Comedy (use film_list as the table). Name the calculated field price_per_minute (hint: use the alias keyword AS).

Show the title and rental_rate per day (rental_duration) for films with a rental_rate less than $3.00 and have a rating of PG or R. Name the calculated field rental_rate_per_day (again use AS). Use film table.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 1 Lnai 9851

Authors: Paolo Frasconi ,Niels Landwehr ,Giuseppe Manco ,Jilles Vreeken

1st Edition

3319461273, 978-3319461274

More Books

Students also viewed these Databases questions

Question

What do we need in order to value a coupon bond?

Answered: 1 week ago