turbot/formula1

Query: formula1_average_attendance_per_game

Usage

powerpipe query formula1.query.formula1_average_attendance_per_game

SQL

select date as "game",
avg(total_results) as "average_attendance"
from (
select
r.date, count(*) as total_results
from
races r
join results rs on r.raceId = rs.raceId
group by
r.date
) as attendance_counts
group by
date;

Dashboards

The query is used in the dashboards: