Closed okaycj closed 3 months ago
select count(distinct sl.name)
from studies_lab sl
where sl.institution not in ('Lookit', '') and sl.approved_to_test
228
select count(*)
from (select given_name, birthday, AGE(NOW(), birthday) as age from accounts_child) sub
where sub.age between (interval '8' year) and (interval '14' year)
8372
select count(distinct sr.study_id) from studies_response sr
join accounts_child ac on ac.id = sr.child_id
where AGE(NOW(), ac.birthday) between interval '8' year and interval '14' year
664
@ianchandlercampbell To the best of knowledge, this should be what you're looking for. Let me know if you have any questions.
@okaycj Perfect, thank you! I'll let the researchers know.
A research lab has asked us if we could provide information for the following statement:
"To date, XXX labs have used our platform to run XXX studies and we have XXX children aged 8-13 years enrolled in our registry"
Would this be an easy thing to query? Or should we offer something similar, but more tractable like "currently XXX children aged 8-13 years are registered on Children Helping Science"?