Skip to main content

Add Queries


You need a database connection to run queries. If you haven't already done so, set up your database connection.

We will be using two queries for our analysis. Copy and paste the queries below into your file under the appropriate headers.

Complaints by Day

Add this to austin-311/ after the 'Complaints by Day' header:
extract(date from created_date) as date,
count(*) as complaints
from `bigquery-public-data.austin_311.311_service_requests`
group by date
order by date desc

Complaints by Department

Add after the 'Complaints by Department' header:
select owning_department as department,
count(*) as complaints
from `bigquery-public-data.austin_311.311_service_requests`
group by department
order by complaints desc

Your page should now look like this:


Now that we have our data sources set up, let's move on to some interesting and powerful ways of displaying that data.