[Need Feedback] CoolTShirt Project Marketing attribution

Hi,
thank you very much for your feedback for this project

The queries used:
/*
1.
How many campaigns and sources does CoolTShirts use? Which source is used for each campaign?

Use three queries:

one for the number of distinct campaigns,
one for the number of distinct sources,
one to find how they are related.

select distinct utm_campaign
from page_visits;
select distinct utm_source
from page_visits;
select utm_campaign, utm_source
from page_visits
group by utm_campaign
;
2.
What pages are on the CoolTShirts website?
Find the distinct values of the page_name column.
select distinct page_name
from page_visits
;
3.How many first touches is each campaign responsible for?
with first_touch as(
select user_id, min(timestamp) as first_touch_at
from page_visits
group by user_id
),
last_touch as(
select user_id, max(timestamp) as last_touch_at
from page_visits
group by user_id
)
select p.utm_campaign, count(l.last_touch_at) as num_last_touch
from last_touch l join page_visits p
on l.user_id = p.user_id and l.last_touch_at = p.timestamp
group by utm_campaign
;
5.How many visitors make a purchase?
Count the distinct users who visited the page named 4 - purchase.
select page_name, count(distinct user_id)as num_visitors
from page_visits
group by page_name
;
6.How many last touches on the purchase page is each campaign responsible for?
with first_touch as(
select user_id, min(timestamp) as first_touch_at
from page_visits
group by user_id
),
last_touch as(
select user_id, max(timestamp) as last_touch_at
from page_visits
group by user_id
)
select p.utm_campaign, count(l.last_touch_at) as num_last_touch
from last_touch l join page_visits p
on l.user_id = p.user_id and l.last_touch_at = p.timestamp
where p.page_name = ‘4 - purchase’
group by utm_campaign
order by 2 desc
;
with first_touch as(
select user_id, min(timestamp) as first_touch_at
from page_visits
group by user_id
),
last_touch as(
select user_id, max(timestamp) as last_touch_at
from page_visits
group by user_id
)
select p.utm_campaign,p.utm_source, count(l.last_touch_at) as num_last_touch
from last_touch l join page_visits p
on l.user_id = p.user_id and l.last_touch_at = p.timestamp
where p.page_name = ‘4 - purchase’
group by 1,2
order by 3 desc
;