I'm new to BQ/SQL.
I'm using Google Analytics dataset to pull a COUNT in the same query for two things:
Total event_name hits
Total event_name hits where a particular criteria was met
This is my query so far. How can I improve line #3 so that the second count occurs as a nested WHERE function while the first count queries the full table? Thanks.
SELECT
COUNT (event_name) AS total_events,
COUNT (event_name) AS goal WHERE event_name = 'visited x page',
FROM \foodotcom-app-plus-web.analytics_1234567.events_20200809``