Query editor
WITH op as (SELECT"from",COUNT(DISTINCT(block_hash)) as txs,COUNT(DISTINCT(DATE(block_time))) as days_active,COUNT(DISTINCT("to")) as interactionsFROM base.transactionsWHERE DATE(block_time) >= current_date - interval '30' dayand successGROUP BY 1),all_stats as (SELECT1 as key_join,COUNT(DISTINCT("from")) AS all_users,COUNT(DISTINCT(hash)) as all_trans,SUM(CAST(l1_fee + (gas_used * gas_price) as double) / 1e18) AS all_tx_feeFROM base.transactionsWHERE DATE(block_time) >= current_date - interval '30' dayand success),op_active as (SELECTaddress,COUNT(DISTINCT("from")) as active_users,COUNT(DISTINCT(hash)) as number_of_transactions,SUM(tx_fee) as tx_feeFROM (SELECT COALESCE(namespace,CAST("to" as varchar)) as address,"from",hash,CAST(l1_fee + (gas_used * gas_price) as double)/ 1e18 as tx_feeFROM base.transactions tLEFT JOIN (SELECT address, namespace FROM base.contracts) f ON "to" = addressWHERE DATE(block_time) >= current_date - interval '30' dayand namespace not in ('op')and successUNION --adding in Mint.Fun data to correctly tagSELECT'mintfun' as address,nft.to as "from",tx_hash as hash,CAST(b.l1_fee + (b.gas_used * b.gas_price) as double)/ 1e18 as tx_feeFROMnft.transfers nftJOIN base.transactions b ON b.hash = nft.tx_hashWHEREnft."from" = 0x0000000000000000000000000000000000000000and nft.block_time >= current_date - interval '30' dayAND blockchain = 'base'AND "RIGHT"(to_hex(b.data), 8) = '0021FB3F'GROUP BY 1,2,3,4) rGROUP BY addressORDER BY COUNT(DISTINCT("from")) DESCLIMIT 50)