pouya_22kosOsher
Updated 2022-09-01
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 stakewise as (
select 'Stakewise' as platform,
block_timestamp::date as date,
sum(amount_usd) as vol,
avg(vol) over(order by date rows between 29 preceding and current row) as MA_30days
from ethereum.core.ez_eth_transfers
where origin_to_address = lower('0xC874b064f465bdD6411D45734b56fac750Cda29A')
and origin_function_signature in ('0x4a58db19','0x3a4b66f1','0x040dee8a') -- Deposit , Stake , Stake With Referrer on Behalf
group by 1,2
--and tx_hash = '0xe19adffef2cb5a7418a86318260959fcfd3b7ccddf7e3c563c8e5b1ef7bbd19c'
),
stkr as (
select 'stkr' as platform,
block_timestamp::date as date,
sum(amount_usd) as vol,
avg(vol) over(order by date rows between 29 preceding and current row) as MA_30days
from ethereum.core.ez_eth_transfers
where origin_to_address = lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670')
and origin_function_signature in ('0x9fa65c56','0xeb834a2c') -- Stake and Claim Aeth C , Stake and Claim Aeth B
group by 1,2
-- and event_inputs:from = lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670')
--and tx_hash = '0x4c5094f611c6b7a074374ef9fdfd063673124e7869cdf6f974f4d67d975c09b5'
),
-- Cream as (
-- select 'Cream' as platform,
-- block_timestamp::date as date,
-- sum(amount_usd) as vol,
-- avg(vol) over(order by date rows between 29 preceding and current row) as MA_30days
-- from ethereum.core.ez_eth_transfers
-- where origin_to_address in ('0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd','0x49d72e3973900a195a155a46441f0c08179fdb64')
-- and origin_function_signature = '0xa9059cbb' -- Transfer
-- group by 1,2
--and tx_hash = '0x77671940e87b0c854e6c7df39cb72f9f8ceeb4e6c3f1525cbcd07ebd4b7736fd'
-- ),
Run a query to Download Data