Query editor
WITHbots as (SELECT * FROM dune.dune.result_solana_dex_bot_detection)SELECTdate_trunc('week',block_time) as week, case when bots.signer is not null then 'bot'else 'person'end as trader_type, sum(COALESCE(input_usd,output_usd)) as volume, sum(case when log_index = 1 then 1 else 0 end) as swaps, count(distinct tx_signer) as tradersFROM jupiter_solana.aggregator_swaps spLEFT JOIN bots ON bots.signer = sp.tx_signergroup by 1,2