The schema below is for a retail online shopping company consisting of two tables,
The attribution table logs a session visit for each row.
true, then the user converted to buying on that session.
channelcolumn represents which advertising platform the user was attributed to for that specific session.
user_sessionstable maps many to one session visits back to one user.
First touch attribution is defined as the channel with which the converted user was associated when they first discovered the website.
Calculate the first touch attribution for each
user_id that converted.