As usual, in this article we'll assume that you're familiar with how to create queries in the Insights module or the SQL warehouse. If not, please reference the linked help articles.

In order to analyze notebook entries over time, we'll first pull data from the entry table:

SELECT id, creator_id, created_at, name, display_id 
FROM entry

Next, we'll want to aggregate these by week or by month. Let's calculate the week for now:

SELECT id, 
creator_id,
created_at,
name,
display_id,
EXTRACT(year from created_at) as year,
EXTRACT(week from created_at) as week
FROM entry

Lastly we'll aggregate by the week. To make this easier, I'll encapsulate the existing logic in a CTE.

with main as (
SELECT id,
creator_id,
created_at,
name,
display_id,
EXTRACT(year from created_at) as year,
EXTRACT(week from created_at) as week
FROM entry
)

select CONCAT(year, '-', week), COUNT(*)
FROM main
GROUP BY CONCAT(year, '-', week)

Lastly, we'll adjust the visualization to be a bar chart instead of a table:

And voila - we now have a view of number of notebook entries created, by week. We could do a similar process to aggregate monthly, quarterly, or yearly statistics.

Did this answer your question?