dbrgSONNE-LP_New Users
Updated 2023-03-29
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
add_LP_TXs as (
select
tx.tx_hash,
tx.block_timestamp,
tx.to_address as user,
tx.raw_amount / power(10, 18) as lp_amount
from
optimism.core.fact_token_transfers tx
WHERE
1 = 1
and tx.from_address = '0x0000000000000000000000000000000000000000'
and tx.contract_address = '0xc899c4d73ed8df2ead1543ab915888b0bf7d57a2'
and tx.block_timestamp >= '{{start_time}}'::date
and tx.block_timestamp < add_months(
'{{start_time}}',
{{duration_in_months}}
)
),
add_USDc_LP as (
SELECT
tx.tx_hash,
tx.raw_amount / power(10, 6) as usdc_amount
from
optimism.core.fact_token_transfers tx
inner join add_LP_TXs lp using (tx_hash)
where
1 = 1
and tx.contract_address = '0x7f5c764cbc14f9669b88837ca1490cca17c31607'
and tx.to_address = '0xc899c4d73ed8df2ead1543ab915888b0bf7d57a2'
),
add_SONNE_lp as (
SELECT
tx.tx_hash,
tx.raw_amount / power(10, 18) as sonne_amount
FROM
Run a query to Download Data