Music Inventory System Queries Using Joins: Write Queries that can do the follow
ID: 3666901 • Letter: M
Question
Music Inventory System
Queries Using Joins:
Write Queries that can do the following using Joins:
List the names of all the songs on a specific album.
List all the musical groups associated with a specific studio.
List the names of all current and former members of a specific musical group.
List the names of all current members of a specific musical group.
List all the first and last names of all artists that are currently or formerly connected with a specific studio.
Create Your Own:
Write 5 Queries and explain what they would return. Use the database on the previous slides. At least two of the queries must contain some form of join.
Hi, I have a data base homework can someone help me with it.
O Songs Artists O Group_Membership V Song_Id INT Artist _Id INT P Group_Id INT Song_Name VARCHAR(300) O Artist_F_Name VARGHAR(45) Artist Id INT O Song Language V ARCHAR(45) O Artist L_Name VARCHAR(45) Music_Groups O Track _Number INT Group_ID INT I Indexes Group_Name VARCHAR(45) D Albums O Date _Formed DATE Album _Id INT O Studio INT to Album _Name VARCHAR(45) ––– Indexes Creator INT Indexes O Studios Studio_ID INT Name VARGHAR(45) IT IndexesExplanation / Answer
select s.Song_Name from Songs s, Song_List sl, Albums a
where s.Song_Id=sl.Song_Id and sl.Album_Id=a.Album.id
select mg.Group_Name from Music_Groups mg, Studios sd
where mg.Studio_Id=sd.Studio.Id
select mg.Group_Name from Music_Groups mg, Group_Membership gm
where mg.Group_Id=gm.Group_Id
select mg.Group_Name from Music_Groups mg, Group_Membership gm
where mg.Group_Id=gm.Group_Id and Still_Member='true'
select a.Artist_F_Name, a.Artist_L_Name from Artists a, Group_Membership gm
where a.Artist_Id=gm.Artist_Id
My Query
1.List all the first and last names of all artists that are currently or formerly connected with a specific
select a.Artist_F_Name, a.Artist_L_Name from Artists a, Group_Membership gm
where a.Artist_Id=gm.Artist_Id and gm.Still_Member='true'
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.