Hessish$BERD airdrop details 2
Updated 2024-04-05
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
›
⌄
-- forked from $toby ot @ https://flipsidecrypto.xyz/edit/queries/ef73a02d-ce68-4abd-ae3c-ec7627b3c316
-- forked from $DOG ot @ https://flipsidecrypto.xyz/edit/queries/8226177c-0213-4f89-bf7e-59c11ce5a8f6
-- forked from $Higher ot @ https://flipsidecrypto.xyz/edit/queries/f5647298-ab7c-4874-902f-998c15cffdb2
-- forked from $DEGEN ot @ https://flipsidecrypto.xyz/edit/queries/6c2910c9-f0ee-4754-bdef-75d677540571
-- forked from $DEGEN airdrop details @ https://flipsidecrypto.xyz/edit/queries/933cf3dc-0597-47b7-83fb-c833950d97c9
with toby as (SELECT BLOCK_TIMESTAMP::date as date, sum(AMOUNT_IN) as t,
sum(AMOUNT_OUT) as we, we/t*avg(price) as price_usd ,TOKEN_IN as TOKEN_ADDRESS, symbol_in as symbol
from base.defi.ez_dex_swaps
join crosschain.price.ez_hourly_token_prices on HOUR::date = BLOCK_TIMESTAMP::date
where --tx_hash = '0xee5c5444fa0c317d32e74c518434264d5b563fc7846624d4f2e6fed241f7925f'
HOUR::date >= '2024-01-01'
and BLOCK_TIMESTAMP::date >= '2024-01-01'
and TOKEN_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
and POOL_NAME = 'WETH-toby 10000 200 UNI-V3 LP'
and TOKEN_IN = '0xb8d98a102b0079b69ffbc760c8d857a31653e56e'
and TOKEN_OUT = '0x4200000000000000000000000000000000000006'
GROUP by all),
berd as ( SELECT BLOCK_TIMESTAMP::date as date, sum(AMOUNT_IN) as t,
sum(AMOUNT_OUT) as we, we/t*avg(price) as price_usd ,TOKEN_IN as TOKEN_ADDRESS, symbol_in as symbol
from base.defi.ez_dex_swaps
join crosschain.price.ez_hourly_token_prices on HOUR::date = BLOCK_TIMESTAMP::date
where --tx_hash = '0xee5c5444fa0c317d32e74c518434264d5b563fc7846624d4f2e6fed241f7925f'
HOUR::date >= '2024-01-01'
and BLOCK_TIMESTAMP::date >= '2024-01-01'
and TOKEN_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
and POOL_NAME = 'WETH-BERD 10000 200 UNI-V3 LP'
and TOKEN_IN = '0xad1c24de53fad18270d5c99026302e989d212b41'
and TOKEN_OUT = '0x4200000000000000000000000000000000000006'
GROUP by all),
QueryRunArchived: QueryRun has been archived