This is a recipe book of SQL tricks meant to serve as a reference for data analysts. There's no particular order to reading these recipes – each one starts with an applicable business case. Start with the most pressing business decision you are facing, and solve it by using the SQL recipe as a template.

Reach

Active Addresses For A Project

Active Addresses For A Chain

Active Addresses For An Event

Transaction Count For A Project

Transaction Count For An Event

Smart Contract Creation Transactions

New Addresses

Retention

Cohort Retention Analysis

Stickiness Ratio For A Project (DAU/MAU)

New vs Existing Addresses

Revenue

TVL/Token Balances Over Time

Total Volume For An Event

Price Of Any Token Over Time

Mean and Total Gas Spent

SQL Techniques

Decoding Events Emitted By An Address