https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
a

abundant-air-78515

01/19/2024, 11:18 PM
i have tested a experiment and i got Credible Interval: [-37.2%, 123%] , do you think its some problem in the setup?
f

fresh-football-47124

01/20/2024, 11:33 AM
its likely you have a small sample size
is the metric binomial?
a

abundant-air-78515

01/21/2024, 3:07 PM
Copy code
SELECT
2c.id AS value,
3c.created_at AS timestamp,
4c.employee_account_id AS user_id,
5c.company_id as company_id
6FROM
7  connection c
8  INNER JOIN account AS a ON a.id = c.employee_account_id
9 WHERE 
10 c.initiated_by = 'employee'
Here is the sql , the value is a id and i want to see what test generetes most ids
So i have set Count as type
and COUNT(DISTINCT value) as User value aggregation
Is this ok setup?
@fresh-football-47124
f

fresh-football-47124

01/24/2024, 8:04 PM
hi Samuel, sorry for the delay. yes, that should be okay
👍 1
you might want to use "1 as value" instead of the id
🙌 1
a

abundant-air-78515

01/25/2024, 5:39 PM
Okey then i dont need to have the COUNT? '
r

rhythmic-agent-34208

01/29/2024, 6:38 PM
Hi Samuel, that's correct, you can omit the ​`COUNT()`​ if you use ​`1 as value`​ Below is an example SQL query for a Metric that uses the Count type:
Copy code
SELECT
    user­_id,
    timestamp,
    1 as value
FROM
    purchases;
This SQL query is designed to count the number of purchases per user. It selects the ​`user­_id`​ and ​`timestamp`​ for each purchase event and assigns a constant value of ​`1`​ to each event. When this query is used in GrowthBook, the ​`value`​ column will be summed up to count the total number of purchase events per user.
a

abundant-air-78515

01/30/2024, 6:32 AM
Thanks!
another fast one 🙂 in this should i have MAX on timestamp or GRoup by on timestamp: SELECT 1 as value, c.created_at AS timestamp, c.company_id AS company_id, c.employee_account_id as user_id FROM demando-data.prod_public.connection c INNER JOIN demando-data.prod_public.account AS a ON a.id = c.employee_account_id WHERE c.assistant_id IS NULL AND c.initiated_by = ‘employee’ GROUP BY user_id, company_id, timestamp
there is many connections on one user_id and i want to see which test have the most user_id that send conections
I want te see which have the most amount of unique company_id
6 Views