Problems / Bounce Rate by Landing Page / Editorial
session_id
COUNT(*)
MAX(CASE WHEN view_order = 1 THEN page END)
landing_page
pageviews = 1
bounces * 100.0 / sessions
Bounce rate lives at the session grain, and the landing page is a *session attribute* that must be derived, not a row attribute you can group by directly. Grouping the raw table by page counts every page a session visited — inflating denominators and making bounces (which visited only one page) uncountable. The MAX(CASE ...) pivot inside the first GROUP BY is the standard idiom for hoisting a "row-1 attribute" up to its parent entity.
page
MAX(CASE ...)
Solve Bounce Rate by Landing Page yourself →