commanderjoseph-761gwXDrift v2 - [BASE] wallets new existing copy
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 marqu / Drift v2 - [BASE] wallets new existing @ https://flipsidecrypto.xyz/marqu/q/9DxlgB74DeKv/drift-v2-base]-wallets-new-existing
with
drift_users as (
select
block_timestamp ::date as date,
tx_id,
signers[0] as wallet_address
from solana.core.fact_events events
inner join solana.core.fact_transactions txs
using(tx_id,block_timestamp,succeeded)
where succeeded
and program_id = 'dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH'
and block_timestamp > '2022-11-04' ::date
-- and block_timestamp ::date > current_date() - interval '{{months}} months' - interval '1 month'
),
first_dates as (
select
wallet_address,
min(date) as date_first
from drift_users
group by 1
),
aggregated as (
select
Run a query to Download Data