gorgeous-toddler-76645
07/21/2023, 5:48 AMamountOfClick
and income
,both data are from the same table. But there's only one value
column in the table. In that case how do we define the value
? or how do we query the metric?white-fireman-22476
07/21/2023, 7:30 AMSELECT
user_id,
amount as value,
received_at as timestamp
FROM
purchase
as a SUM where the denominator is "orders per user"
2. the total revenue per user which would also be a "revenue" type metric
SELECT
user_id,
amount as value,
received_at as timestamp
FROM
purchase
as a SUM where the denominator is "All experiment users"
3. or perhaps just the orders per user which would be a "count" metric:
SELECT
user_id,
received_at as timestamp
1 as value
FROM
purchase
where the denominator is "All Experiment users"
All of which could be gotten from the same table. Does this answer your question?