Question: ACTIVITY The given SQL creates a Song table and inserts some songs. The first SELECT statement selects songs released after 1 9 9 2 .
ACTIVITY
The given SQL creates a Song table and inserts some songs. The first SELECT statement selects songs released after The second SELECT statement selects the release year for song with ID
Create a third query that combines the two existing queries. The first SELECT should be the outer query, and the second SELECT should be the subquery. The ORDER BY clause should appear after the subquery.
Run your solution and verify the new query returns a result table with five rows, all with release years after
CREATE TABLE Song
ID INT,
Title VARCHAR
Artist VARCHAR
Releaseyear INT,
Genre VARCHAR
PRIMARY KEY ID
;
INSERT INTO SONG VALUES
'Hey Jude', 'Beatles', 'pop rock'
'You Belong with Me 'Taylor Swift', 'country pop'
'Youl're still the One', 'Shania Twain', 'country pop'
'Need You Now', 'Lady Antebellum', 'country pop'
'You ve Lost That Lovin' Feeling', 'The Righteous Brothers', R&B
'Thatl's The way Love Goes', 'Janet Jackson', R&B
'Smells Like Teen Spirit', 'Nirvana', 'grunge'
'Even Flow', 'Pearl Jam', 'grunge'
'Black Hole Sun', 'Soundgarden', 'grunge' ;
SELECT
FROM SOng
WHERE Releaseyear
ORDER BY ReleaseYear;
SELECT Releaseyear
FROM SOng
WHERE ID ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
