Skip to main content

Add Queries

Let's making a new page for our queries. Create a new markdown page called (in the same file as, adding the following code to create the sections, and add a query

Add this to
# Business Performance
Below is a summary of Needful Things' sales.
count(sales) as orders,
sum(sales) as sales_usd,
sum(sales) / count (sales) as basket_size
from orders
group by order_month
order by order_month desc

Your page should now look like this:


You can see both the query SQL, and the resulting data using the dropdowns.


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