hessPools Overview II
Updated 2023-07-03
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
pair as (
select
block_timestamp,
tx_hash,
origin_from_address as swapper,
contract_address as pool_address,
pool_name,
amount_in,
token_in,
amount_out,
token_out
from
polygon.core.ez_dex_swaps
where
platform = 'quickswap-v3'
),
price as (
select
hour::date as date,
token_address,
avg(price) as avg_price
from
polygon.core.fact_hourly_token_prices
group by
1,
2
),
fee as (
select
a.block_timestamp,
a.tx_hash,
swapper,
pool_name,
pool_address,
amount_in * c.avg_price as amount_in_usd,
Run a query to Download Data