SQL (pertaining to 'playlist maker' challenge'
Hello,
The site won't allow me to move on to the next step when I enter this code into code editor: SELECT * FROM songs WHERE title = "Bohemian Rhapsody" OR title = "Bicycle Race";
please assist.
Hello,
The site won't allow me to move on to the next step when I enter this code into code editor: SELECT * FROM songs WHERE title = "Bohemian Rhapsody" OR title = "Bicycle Race";
please assist.
Your query should return all songs from the artist "Queen" which is currently does, but you had to look and find all the titles and add them to your query individually. So, although these songs are from that artist, your query should work without having to modify it if you add another song from Queen.
Assume that there are thousands of songs, and you want to display all songs from a particular artist. You wouldn't want to look through all the songs to find the titles of each one and build your query. You want to tell the computer to show you all the titles for the particular artist.
How do I complete Step 2 of the Playlist maker challenge.
Do you know how to complete Step 2 of the challenge?
Can you help me out?
You don't need to answer me immediatly but I need an answer before winter break ends, on Janurary 18, 2027.
Deepest regrets for not being able to finish the assignment,
Skyler Otto
Skyler Otto,
Questions to get help with a computing Challenge are most commonly asked and answered in the Discussion area under the video or article immediately preceding the challenge (in this case, 'Querying IN subqueries'). You may find useful explanations there, and it's usually the best place to ask for help with the challenge.
What was your selection line for step 1?
What are the instructions for step 2?
What have you tried for step 2?
My selection line for step 1 is:
SELECT "title" FROM songs WHERE artist="Queen"
I managed to fix my mistake for step 2. My code is:
SELECT "name" FROM artists WHERE genre="Pop"
Now I need help with step 3. My code so far is:
SELECT "artist" FROM songs WHERE title IN ("Pop")
What am I missing?
The instructions state "It should use IN on a nested subquery that's based on your previous query." You're missing the nested subquery based on
SELECT "name" FROM artists WHERE genre="Pop"
You could look at the previous video for a reference with the nested subquery 'SELECT type FROM drs_favorites':
SELECT * FROM exercise_logs WHERE type IN (
SELECT type FROM drs_favorites);
Does that help?
~ Janice
JaniceHolz,
I don't know if it helped, I looked back at the video, use the IN tag, and did what was needed:
(SELECT "genre" FROM artists WHERE genre= "Pop");
This is the new code. Am I missing something? Hopper doesn't say I can finish the step and spin-off the challenge. There must be something missing.
Thanks,
Skyler Otto
Log ind for at efterlade en kommentar.