Building-and-organizing-complex-queries/3/the-with-clause

Screen Link:

My Code:
<
WITH playlist_info AS
(
SELECT
pl.playlist_id,
pl.name playlist_name,
COUNT(pt.track_id) number_of_tracks,
SUM(t.milliseconds/1000.0) length_seconds
FROM track t
LEFT JOIN playlist_track pt ON pt.track_id = t.track_id
LEFT JOIN playlist pl ON pt.playlist_id = pl.playlist_id
)

SELECT * FROM playlist_info;

What I expected to happen:

show all rows and not only one

What actually happened:

output was only 1 row:

[1 rows x 4 columns]

playlist_id

playlist_name

number_of_tracks

length_seconds

13

Classical 101 - Deep Cuts

8715

3222109.0590000227

the answer of this is:
<
WITH playlist_info AS
(
SELECT
p.playlist_id,
p.name playlist_name,
t.name track_name,
(t.milliseconds / 1000) length_seconds
FROM playlist p
LEFT JOIN playlist_track pt ON pt.playlist_id = p.playlist_id
LEFT JOIN track t ON t.track_id = pt.track_id
)

SELECT
playlist_id,
playlist_name,
COUNT(track_name) number_of_tracks,
SUM(length_seconds) length_seconds
FROM playlist_info
GROUP BY 1, 2
ORDER BY 1;

with 18 rows instead of 1, Its because count and sum is made outside the subquery? I imagine that but donĀ“t understand why is a difference