SalehEposh4 Sum copy
Updated 2024-08-26Copy Reference Fork
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
›
⌄
-- forked from damidez / Eposh4 Sum @ https://flipsidecrypto.xyz/damidez/q/DVGqxiEeO6Im/eposh4-sum
WITH SolayerEposh AS (
SELECT
BLOCK_TIMESTAMP,
tx_id,
signers[0] AS authority,
instruction.value:parsed.info.mint::string AS LST,
instruction.value:parsed.info.amount::numeric / 1000000000 AS Adjusted_amount
FROM
solana.core.fact_events,
TABLE(FLATTEN(input => INNER_INSTRUCTION:instructions)) AS instruction
WHERE
program_id = 'sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn'
AND instruction.value:parsed.type::string = 'mintTo'
AND BLOCK_TIMESTAMP >= '2024-06-01'
AND SUCCEEDED = 'TRUE'
)
SELECT COUNT(DISTINCT authority) AS Depositors,
ROUND(SUM(Adjusted_amount)) AS TotalSolDeposited,
ROUND(AVG(Adjusted_amount)) AS AvgDeposited
FROM SolayerEposh
QueryRunArchived: QueryRun has been archived