Write sql statements for the ten queries - find the names


Consider the following database schema:

Artists (artistID: int, name: varchar (255))

SimilarArtists (artistID: int, simArtistID: int, weight: int)

Albums (albumID: int, artistID: int, name: varchar (255))

Tracks (trackID: int, artistID: int, name: varchar (255), length: int)

TrackLists (albumID: int, trackID: int, trackNum: int)

All primary keys are underlined. All foreign keys have the same name as the primary key that they are referencing. When asking about the similarity of one Artist to another, you can safely assume that the pair of Artists will only appear in one tuple in the SimilarArtists table.

Write SQL statements for the following ten queries:

1. Find the names of all Tracks that are more than 10 minutes (600,000 ms) long. Result: (name: varchar(255))

2. Find the names of all Artists who have recorded a self-titled Album (the name of the Album is the same as the name of the Artist). Result: (name: varchar(255))

3. Find the names of all Artists who have recorded an Album on which the first track is named "Intro". Result: (name: varchar(255))

4. Find the names of all Artists who are more similar to Mogwai than to Nirvana (meaning the weight of their similarity to Mogwai is greater). Result: (name: varchar(255))

5. Find the names of all Albums that have more than 30 tracks. Result: (name: varchar(255))

6. Find the names of all Artists who do not have a similarity rating greater than 5 to any other Artist. Result: (name: varchar(255))

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Write sql statements for the ten queries - find the names
Reference No:- TGS0943041

Expected delivery within 24 Hours