yasmin-n-d-r-hfinalstablecoin
Updated 2022-11-16Copy Reference Fork
99
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 swapped_From as (
SELECT
date_trunc('day', block_timestamp) as date,
project_name,
count( DISTINCT(trader) ) as trader,
count( DISTINCT(tx_id)) as transection,
sum(TO_AMOUNT / TO_DECIMAL) as amount
from
osmosis.core.fact_swaps a
join osmosis.core.dim_labels b on a.from_currency = b.address
where (PROJECT_NAME like '%USDC%'
or PROJECT_NAME like '%DAI%'
or PROJECT_NAME like '%USDT%' )
AND block_timestamp >= CURRENT_DATE - 30
group by
1,
2
),
swapped_To as(
SELECT
date_trunc('day', block_timestamp) as date,
project_name,
count(DISTINCT(trader)) as trader,
count(DISTINCT(tx_id) ) as transection,
sum(TO_AMOUNT / TO_DECIMAL) as amount
from
osmosis.core.fact_swaps a
join osmosis.core.dim_labels b on a.to_currency = b.address
where
(
PROJECT_NAME like '%USDC%'
or PROJECT_NAME like '%DAI%'
or PROJECT_NAME like '%USDT%'
)
AND block_timestamp >= CURRENT_DATE - 30
group by
Run a query to Download Data