This displays a sessions and bounce rate from the past 30 days aggregated by medium.
SELECT
medium,
SUM(sessions) sum_sessions,
SUM(bounces):: float / SUM(sessions) bounce_rate
FROM
public."google-analytics" -- Table name might be different based on Schema and Destination settings in the data source
WHERE
datehour > sysdate - 30 -- Value can be changed \ Filter can be removed
GROUP BY
1
ORDER BY
2 DESC
Column | Description |
---|---|
medium |
The type of referral |
sum_sessions |
Sum of sessions |
bounce_rate |
Sum of bounces divided by sum of sessions |