Query editor
WITH transactions AS (SELECTevt_tx_hash AS hash,"from","to",value,evt_block_time AS block_timeFROM erc20_base.evt_TransferWHERE"to" = 0x327Df1E6de05895d2ab08513aaDD9313Fe505d86), token_transfers AS (SELECTevt_tx_hash AS hash,contract_address AS token_address,value AS token_amountFROM erc20_base.evt_TransferWHERE"to" = 0x327Df1E6de05895d2ab08513aaDD9313Fe505d86), token_prices AS (SELECTminute,contract_address AS token_address,priceFROM prices.usdWHEREblockchain IS NULL), joined_data AS (SELECTt.hash,t."from",t.value AS eth_value,tt.token_address,tt.token_amount,tp.price AS token_price,t.block_time,(tt.token_amount / 1e18) * tp.price AS token_value_in_usdFROM transactions tJOIN token_transfers ttON t.hash = tt.hashLEFT JOIN token_prices tpON tt.token_address = tp.token_addressAND DATE_TRUNC('minute', t.block_time) = tp.minute)SELECTblock_time,hash,"from",eth_value,token_address,token_amount,token_price,token_value_in_usd,COUNT(*) OVER () AS total_transactions,SUM(token_value_in_usd) OVER () AS total_volume_in_usdFROM joined_dataORDER BYblock_time DESC;