Question: In this assignment you will practice the SQL skills developed in the course. For this, we will be using the sample SQLITE database: DB Browser.

In this assignment you will practice the SQL skills developed in the course. For this, we will be using the sample SQLITE database: DB Browser.
Create a new Table Music Video, that is a class of type Track
(
generalization
)
but adds the attribute Video director. A music video is a track. There cannot be a video without a track, and each track can have either no video or just one.
Write the queries that insert at least
1
0
videos, respecting the problem rules. Insert another video for the track "Voodoo", assuming that you don't know the TrackId, so your insert query should specify the TrackId directly.
Tip: For a different database with People and Quotes, here is how to insert a Quote from the name of the Person
-
-
Inserts John in the Person table
INSERT INTO Persons
(
name
)
VALUES
(
"
John
"
)
;
-
-
Inserts a new Quote for John
INSERT INTO Quote
(
person
_
id
,
quote
)
SELECT person
_
id
,
"
It Worked
"
FROM Person
WHERE name
=
=
"John";
Write a query that lists all the customers that listen to longer
-
than
-
average tracks, excluding the tracks that are longer than
1
5
minutes.
Write a query that lists all the tracks that are not in one of the top
5
genres with longer duration in the database.
Define an insightful query on your own that involves at lhfeast three tables
The professor gave us the chinook.db sample data to use to create this assigment, data consists of music , artrists, customers, etc.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!