I am trying to compare two columns page_entry & exit_page if both true value of 1 then its a bounce.
Page_entry | exit_page | Bounce
1 1 true
0 1 false
etc etc ......
this is what I came up with and it only shows me the true values
select hit_id,visit_num,
CASE
WHEN entry_page = exit_page
THEN 'True'
ELSE 'False'
END as Bounce
FROM [dbo].[Primary]
WHERE entry_page = exit_page
END
BUT now I need to write a calculation like
SUM(IF Bouce = TRUE THEN 1 ELSE 0 END)/page_visit
Aucun commentaire:
Enregistrer un commentaire