winnie-fsAmmo bought & refill copy
Updated 2023-07-20
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
›
⌄
-- forked from Aephia / Ammo bought & refill @ https://flipsidecrypto.xyz/Aephia/q/o8uI0OcsE8Qx/ammo-bought-refill
WITH active_users AS (
SELECT
--signers as active_users
array_to_string (signers,',') as active_users
FROM solana.core.fact_events
WHERE program_Id = 'FLEET1qqzpexyaDpqb2DGsSzE2sDCizewCg9WjrA6DBW'
AND succeeded = 'true'
AND block_timestamp > current_date -30
),
wallets AS (
SELECT
case when block_timestamp > current_date -30
THEN signers end as wallets_30,
case when block_timestamp < current_date -30
THEN signers end as wallets_all
FROM solana.core.fact_events
WHERE program_Id = 'FLEET1qqzpexyaDpqb2DGsSzE2sDCizewCg9WjrA6DBW'
AND succeeded = 'true'
),
arrays AS (
SELECT
array_unique_agg(wallets_30) as active_users_30,
array_unique_agg(wallets_all) as active_users_all,
array_except(active_users_all, active_users_30) as inactive_wallets
FROM wallets
),
Run a query to Download Data