ramishoow2023-02-14 12:04 PM
Updated 2023-02-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
with ramishow as ( select TX_RECEIVER , BLOCK_TIMESTAMP::date as time , count( distinct TX_HASH) as "transfer count" , sum(deposit/pow(10,24)) as "transfer amount"
from near.core.fact_transfers where TX_RECEIVER='wrap.near' and STATUS=1
--from near.core.fact_transfers where TX_RECEIVER='wrap.near' and STATUS=1
group by 1 , 2) , transfer_out as ( select TX_SIGNER , BLOCK_TIMESTAMP::date as time , count( distinct TX_HASH) as "transfer count" , sum(deposit/pow(10,24)) as "transfer amount"
from near.core.fact_transfers where TX_SIGNER='wrap.near' and STATUS=1 group by 1 , 2) , swap_in as (select TRADER , BLOCK_TIMESTAMP::date as time , count(distinct TX_HASH) as swap_count , sum(AMOUNT_IN) as swap_amount
from near.core.ez_dex_swaps where TRADER='wrap.near' and TOKEN_IN like '%NEAR%' group by 1 , 2) , swap_out as (select TRADER , BLOCK_TIMESTAMP::date as time , count(distinct TX_HASH) as swap_count , sum(AMOUNT_OUT) as swap_amount
from near.core.ez_dex_swaps where TRADER='wrap.near' and TOKEN_OUT like '%NEAR%' group by 1 , 2) , stake as (select TX_SIGNER , block_timestamp::date as time , count(distinct TX_HASH) as stake_count, sum(STAKE_AMOUNT/1e24) as stake_amount
from near.core.dim_staking_actions where TX_SIGNER='wrap.near' and action='Stake' group by 1 , 2) , un_stake as (select TX_SIGNER , block_timestamp::date as time , count(distinct TX_HASH) as stake_count, sum(STAKE_AMOUNT/1e24) as stake_amount
from near.core.dim_staking_actions where TX_SIGNER='wrap.near' and action='Unstake' group by 1 , 2) , transactions_in as (select TX_RECEIVER , block_timestamp::date as time , count(distinct TX_HASH) as transaction_count from near.core.fact_transactions
where TX_STATUS='Success' and TX_RECEIVER='wrap.near' group by 1 , 2) , transactions_out as (select TX_SIGNER , block_timestamp::date as time , count(distinct TX_HASH) as transaction_count from near.core.fact_transactions
where TX_STATUS='Success' and TX_SIGNER='wrap.near' group by 1 , 2) select * from transactions_in
--where TX_STATUS='Success' and TX_SIGNER='wrap.near' group by 1 , 2) select * from transactions_in
--Rami
Run a query to Download Data