Answered step by step
Verified Expert Solution
Question
1 Approved Answer
albums Saturday Night Fever and 2 1 . 2 . Modify the GROUP BY clause to select albums with three or more songs by the
albums Saturday Night Fever and
Modify the GROUP BY clause to select albums with three or more songs by the same artist. Run the query and verify the result table shows just the album
'Saturday Night Fever',
'Born in the USA
'Supernatural',
;
CREATE TABLE Song
ID INT,
Title VARCHAR
Artist VARCHAR
AlbumID INT,
PRIMARY KEY ID
FOREIGN KEY AlbumID REFERENCES AlbumID
;
INSERT INTO SONG VALUES
'Stayin' Alive', 'Bee Gees',
'More Than a Woman', 'Bee Gees',
If I Can't Have You', 'Yvonne Elliman',
'Dancing in the Dark', 'Bruce Springsteen',
'Glory Days', 'Bruce Springsteen',
'Smooth', 'Santana',
'Rolling in the Deep', 'Adele',
'Someone Like You', 'Adele',
'Set Fire to the Rain', 'Adele',
'Rumor Has It 'Adele', ;
SELECT
FROM Album
WHERE EXISTS
SELECT COUNT
FROM SONg
WHERE AlbumID Album. ID
GROUP BY AlbumID
HAVING COUNT ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started