square-book-75964
02/22/2023, 8:25 PM-- revenue metric
SELECT session_id, timestamp, value
FROM `analytics_table`
WHERE
DATE(timestamp) >= '{{ startYear }}-{{ startMonth }}-{{ startDay }}' AND
DATE(timestamp) < '{{ endYear }}-{{ endMonth }}-{{ endDay }}' AND
event_type = "measure.performance";
-- result
session_id, timestamp, value
04109507985808136, 2023-02-22 04:08:12.968000 UTC, 100
15543816462148774, 2023-02-22 18:47:04.647000 UTC, 100
3077078075067108, 2023-02-22 19:17:07.746000 UTC, 80
-- boolean metric
SELECT session_id, timestamp
FROM `analytics_table`
WHERE
DATE(timestamp) >= '{{ startYear }}-{{ startMonth }}-{{ startDay }}' AND
DATE(timestamp) < '{{ endYear }}-{{ endMonth }}-{{ endDay }}' AND
event_type = "event.user_login";
-- result
session_id, timestamp
09394803480633995, 2023-02-16 05:21:27.067000 UTC
04109507985808136, 2023-02-22 04:08:12.971000 UTC
584359669554074, 2023-02-22 18:44:43.114000 UTC
8744928360643573, 2023-02-22 18:45:59.913000 UTC
15543816462148774, 2023-02-22 18:47:04.649000 UTC
024268435383898, 2023-02-22 18:49:12.402000 UTC
957748078153098, 2023-02-22 18:50:27.199000 UTC
3077078075067108, 2023-02-22 19:17:07.751000 UTC
fresh-football-47124
square-book-75964
02/22/2023, 9:57 PMfresh-football-47124
square-book-75964
02/22/2023, 10:03 PMfresh-football-47124
square-book-75964
02/22/2023, 10:08 PMfresh-football-47124
square-book-75964
02/23/2023, 5:29 PMfresh-football-47124
square-book-75964
02/23/2023, 7:46 PM