Query editor
WITH base AS (SELECT "from" AS address,"value" / 1e18 AS eth_sent,(gas_price * gas_used) / 1e18 AS tx_feeFROM ethereum.transactionsWHERE 1=1AND DATE_TRUNC('day', block_time) = CURRENT_DATEAND "value" > 0),sum AS (SELECT address,SUM(eth_sent) AS total_sent,SUM(tx_fee) AS total_feeFROM baseGROUP BY 1)SELECT s.*,total_sent * p.price AS usd_sent,total_fee * p.price As usd_fee,total_fee / total_sent AS fee_ratioFROM sum sLEFT JOIN prices.day p ON p.timestamp = CURRENT_DATE AND blockchain = 'ethereum' AND contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2ORDER BY usd_fee DESCLIMIT 10