Coderbyte SQL member count solution
Free sample test question
SELECT
ReportsTo
,count(id) as Members
,round(avg(age)) as `Average Age`
FROM maintable_R70YE
where ReportsTo is not null
group by ReportsTo
order by ReportsTo asc
SELECT
ReportsTo
,count(id) as Members
,round(avg(age)) as `Average Age`
FROM maintable_R70YE
where ReportsTo is not null
group by ReportsTo
order by ReportsTo asc