Query editor
-- Cowswap Ethereumwith cowswap_eth as (SELECTdate_trunc('day', c.block_time) as time, case when true then 'CoW Swap' end as protocol, case when true then 'CoW Swap' end as project, case when true THEN 'ethereum' end as blockchain, c.sell_token as token_sold_symbol, c.units_sold as token_sold_amount, c.buy_token as token_bought_symbol, c.units_bought as token_bought_amount, c.usd_value as amount_usd, trace.function_nameFROM cow_protocol_ethereum.trades cleft join (select tx_hash, function_name from ethereum.traces_decoded where block_time >= date(timestamp '{{1. startdate}}') and lower(function_name) like '%rfq%') as trace on c.tx_hash = trace.tx_hashWHERE block_date >= date(timestamp '{{1. startdate}}')and lower(function_name) like '%rfq%')-- -- Cowswap gnosis-- , cowswap_gnosis as (-- SELECT-- date_trunc('day', block_time) as time-- , case when true then 'CoW Swap' end as protocol-- , case when true then 'CoW Swap' end as project-- , case when true THEN 'gnosis' end as blockchain-- , sell_token as token_sold_symbol-- , units_sold as token_sold_amount-- , buy_token as token_bought_symbol-- , units_bought as token_bought_amount-- , usd_value as amount_usd-- FROM-- cow_protocol_gnosis.trades-- WHERE block_date >= date(timestamp '{{1. startdate}}')-- )-- union all data, all_rfqs as (select * from cowswap_eth-- union all-- select * from cowswap_gnosis), stat as (selectupper(blockchain) as blockchain, time, sum(amount_usd) as volumefrom all_rfqsgroup by 1, 2)select * from statorder by time desc, blockchain