Flipside Community3a) Trade volume among new users
Updated 2024-05-29
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
›
⌄
-- forked from 2b @ https://flipsidecrypto.xyz/edit/queries/956394e3-fe4f-4801-b8b3-68e508994b63
with arbitrum as
(
with addresses as
(
select from_address, min(block_timestamp) as first_transaction_sent
from arbitrum.core.fact_transactions
group by from_address
having first_transaction_sent >= '{{Start_date}}'
),
volume_traded as
(
(
select origin_from_address as from_address,amount_in_usd as amount_usd from arbitrum.defi.ez_dex_swaps
where block_timestamp >= '{{Start_date}}'
and origin_from_address in ( select from_address from addresses)
)
union
(
select seller_address,price_usd as amount_usd from arbitrum.nft.ez_nft_sales
where block_timestamp >= '{{Start_date}}'
and seller_address in ( select from_address from addresses)
)
)
select 'arbitrum' as chain, sum(amount_usd) as trade_volume from volume_traded
),
ethereum as
(
with addresses as
(
select from_address, min(block_timestamp) as first_transaction_sent
from ethereum.core.fact_transactions
group by from_address
having first_transaction_sent >= '{{Start_date}}'
QueryRunArchived: QueryRun has been archived