Updated 2023-03-02
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
›
⌄
-- select
-- chain, protocol, sum(volume)
-- from external.defillama.fact_dex_volume
-- where
-- date >= (select max(date) - 1 from external.defillama.fact_dex_volume)
-- group by
-- chain, protocol
with swaps as
(
select distinct tx_hash, origin_from_address, origin_to_address
from bsc.core.fact_event_logs a
where
block_timestamp::date >= current_date() - 21
and event_name = 'Swap'
and tx_status = 'SUCCESS'
),
raw_data as
(
select
'tt' action,
a.block_timestamp,
a.tx_hash,
a.origin_from_address,
a.origin_to_address,
a.from_address,
a.to_address,
a.contract_address,
a.raw_amount
Run a query to Download Data