Query editor
/*Get ERC20 token namesReferences:- ERC20 | Token names: https://dune.com/queries/3340302- Docs: https://dune.com/docs/query/query-a-query/*/with erc20_tokens as (select *from query_3340302),/*Generate continuous series of dates using celo.blocks*/date_series as (select distinct date_trunc('{{granularity}}', date) as datefrom celo.blocks),/*Get unique fee currencies*/fee_currencies as (SELECT DISTINCT fee_currencyFROM celo.transactions-- exclude transactions without fee currencywhere fee_currency is not null),/*Prepare a table with all dates and fee currencies we want a cumulative sum for*/all_dates AS (SELECT date_series.date, fee_currencies.fee_currencyFROM date_seriesCROSS JOIN fee_currencies),/*Count fee currencies by fee currency and timeReferences:- Fee Currency | Alternative fee currency transactions (transaction type 123): https://dune.com/queries/3294063*/fee_currency_transactions as (selectDATE_TRUNC('{{granularity}}', block_time) as date,fee_currency,count(*) as transaction_countfrom celo.transactionsgroup byfee_currency,DATE_TRUNC('{{granularity}}', block_time)),/*Join the fee currency transaction count with all dates to ensure every date and currency is represented in the time series.*/cumulative_transactions AS (