Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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