Query editor
WITH eth_prices AS (SELECTdate_trunc('hour', timestamp) AS evt_hour,MAX(price) AS priceFROM prices.hourWHERE blockchain = 'ethereum'AND symbol = 'ETH'GROUP BY 1),relevant_txs AS (SELECTtx_from,tx_hash,date_trunc('hour', tx_block_time) AS tx_hourFROM transfers_ethereum.ethWHERE to = 0x81f03983626e528f30da9776774e413f3e2b1e7c-- AND tx_block_time <= from_iso8601_timestamp('2025-02-18T04:00:00.000+00:00'))SELECTe.tx_from AS user_address,SUM(e.value_decimal * p.price) AS amount_spent_usdFROM transfers_ethereum.eth eJOIN relevant_txs rtON e.tx_from = rt.tx_fromAND e.tx_hash = rt.tx_hashJOIN eth_prices pON date_trunc('hour', e.tx_block_time) = p.evt_hourWHERE e.trace_address = ARRAY[]GROUP BY e.tx_fromORDER BY amount_spent_usd DESC;