This article will help you:
|
Grouping your users by user properties will give you insight into who is using your product. The examples below will help you construct Redshift queries that will enable you to do this; just replace the values in red with your own.
Show the breakdown of user devices in a two-week period
SELECT device_model, COUNT(DISTINCT(amplitude_id)) FROM events123 WHERE DATE(event_time) BETWEEN '2017-03-30' AND '2017-04-06' GROUP BY device_model ORDER BY COUNT DESC;
This query counts the number of distinct users by device for the first two weeks in March. If a user triggers events on multiple devices during this time, they'll be counted separately in each device bucket.
Filter on another user property
To filter on another user property, add it to the WHERE
clause:
SELECT device_model, COUNT(DISTINCT(amplitude_id)) FROM events123 WHERE DATE(event_time) BETWEEN '2017-03-30' AND '2017-04-06' AND WHERE country = 'India' GROUP BY device_model ORDER BY COUNT DESC;