i have tested a experiment and i got Credible Inte...
# ask-questions
a
i have tested a experiment and i got Credible Interval: [-37.2%, 123%] , do you think its some problem in the setup?
f
its likely you have a small sample size
is the metric binomial?
a
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
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
Okey then i dont need to have the COUNT? '
r
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
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