Marketing Attribution Project

This is the code I came up with for determining first touches by campaign:
WITH first_touch AS(

SELECT utm_source, utm_campaign, user_id, MIN(timestamp)

FROM page_visits

GROUP BY 3

)

SELECT utm_source, utm_campaign, COUNT(user_id) AS ‘# of first_touch’

FROM first_touch

GROUP BY 2

ORDER BY 3 DESC;

However after looking the hint to see if my answer was right, the code provided was:
WITH first_touch AS (

SELECT user_id,

    MIN(timestamp) as first_touch_at

FROM page_visits

GROUP BY user_id),

ft_attr AS (

SELECT ft.user_id,

     ft.first_touch_at,

     pv.utm_source,

     pv.utm_campaign

FROM first_touch ft

JOIN page_visits pv

ON ft.user_id = pv.user_id

AND ft.first_touch_at = pv.timestamp

)

SELECT ft_attr.utm_source,

   ft_attr.utm_campaign,

   COUNT(*)

FROM ft_attr

GROUP BY 1, 2

ORDER BY 3 DESC;

The results are the same so I wanted to know what the difference between the 2 queries is.

Thank you
https://www.codecademy.com/paths/data-science/tracks/analyze-data-sql-analyze-real-data/modules/analyze-data-sql-marketing-attribution/projects/analyze-data-sql-attribution-queries