Last active
April 10, 2024 03:37
-
-
Save lfy79001/fa2a98f63d3a05605eb5c8eb679646d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
item_id, | |
item_name, | |
COUNT(DISTINCT user_pseudo_id) AS user_count | |
FROM | |
`bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`, UNNEST(items) | |
WHERE | |
_TABLE_SUFFIX BETWEEN '20201101' AND '20201130' | |
AND event_name IN ('add_to_cart') | |
GROUP BY | |
1, 2 | |
ORDER BY | |
user_count DESC | |
LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment