Mrfti2023-06-14 06:28 PM
Updated 2023-11-07
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
›
⌄
with
alltbl1 AS (
with
alltbl AS (
with
general as (
with
tbl1 as (
select
date_trunc(day, block_timestamp) as date,
tx_hash,
contract_address,
event_name
from
polygon.core.ez_decoded_event_logs
where
contract_address = lower('0xba12222222228d8ba445958a75a0704d566bf2c8') --balancer contract
and block_timestamp >= '2023-05-01'
and event_name = 'PoolBalanceChanged'
and decoded_log:poolId = '0xf0ad209e2e969eaaa8c882aac71f02d8a047d5c2000200000000000000000b49' -- gyroscope eclp contract
),
tbl2 as (
SELECT
date_trunc(day, block_timestamp) as date,
from_address,
symbol,
amount,
amount_usd
from
polygon.core.ez_token_transfers
WHERE
tx_hash in (
select
tx_hash
FROM
tbl1
Run a query to Download Data