StangFAST01 : All chain have SUSHI
Updated 2023-03-11
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with
arbitrum_chain AS
(
SELECT
'arbitrum' AS chain
, date_trunc( 'month' , ez.block_timestamp ) AS date
, count( DISTINCT ez.tx_hash ) AS tx_count
, count( DISTINCT ez.origin_from_address ) AS unique_user
, sum( tx_count ) over ( ORDER BY date ASC ) AS cumulative_tx
, sum( unique_user ) over ( ORDER BY date ASC ) AS cumulative_user
-- SUSHI
, sum
(
CASE
when ez.token_out = '0xd4d42f0b6def4ce0383636770ef773390d85c61a' then ez.amount_out_usd
when ez.token_in = '0xd4d42f0b6def4ce0383636770ef773390d85c61a' then ez.amount_in_usd
END
) AS SUSHI_volume_USD
, sum( SUSHI_volume_USD ) over ( ORDER BY date ASC ) AS cumulative_SUSHI_volume_usd
, sum
(
CASE
when ez.token_out = '0xd4d42f0b6def4ce0383636770ef773390d85c61a' then ez.amount_out
when ez.token_in = '0xd4d42f0b6def4ce0383636770ef773390d85c61a' then ez.amount_in
END
) AS SUSHI_volume
, sum( SUSHI_volume ) over ( ORDER BY date ASC ) AS cumulative_SUSHI_volume
-- SUSHI
FROM
arbitrum.sushi.ez_swaps ez
WHERE
ez.block_timestamp::date >= '2022-06-01'
Run a query to Download Data