Fundamentals of SQL II - Datatypes and Column Operations

Screen Link: Learn data science with Python and R projects

My Code:

SELECT 'Playlist: ’ || name AS playlist_name
FROM playlist;

What I expected to happen:

|playlist_name|
|Playlist: Music|
|Playlist: Movies|
|Playlist: TV Shows|
|Playlist: Audiobooks|
|Playlist: 90s Music|
|Playlist: Audiobooks|
|Playlist: Movies|
|Playlist: Music|
|Playlist: Music Videos|
|Playlist: TV Shows|
|Playlist: Brazilian Music|
|Playlist: Classical|
|Playlist: Classical 101 - Deep Cuts|
|Playlist: Classical 101 - Next Steps|
|Playlist: Classical 101 - The Basics|
|Playlist: Grunge|
|Playlist: Heavy Metal Classic|
|Playlist: On-The-Go 1|

What actually happened:

|playlist_name|
|Playlist: Music|
|Playlist: Movies|
|Playlist: TV Shows|
|Playlist: Audiobooks|
Playlist: 90’s Music
Playlist: Audiobooks
Playlist: Movies
Playlist: Music
Playlist: Music Videos
Playlist: TV Shows

Basically there is no error that’s coming up, but the code is only returning 10 of the playlists instead of all 18??

I know this is probably really simple - this is literally my first day learning code…please let me know if I’m missing something!

Thank you!

Hi botanical

Your code and the output you got, both are correct. The Learn section shows 18 rows in the table, but if you run

SELECT *
  FROM playlist;

in the right-side script, it will list out 10 rows. So, there’s is nothing wrong with your code here.

Hope it helps.

1 Like

Thank you @dash.debasmita I really appreciate it! :pray:t3: