AshlyCryptoyes/no voting
Updated 2023-03-11
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
›
⌄
with
proposal_t1 as (
SELECT
proposal as proposal_field1,
voter as voter_field1,
max(
CASE
when time < block_timestamp then time
end
) as max_date
FROM
solana.core.fact_proposal_votes
full JOIN (
SELECT
block_timestamp as time,
CASE
when tx_to LIKE 'HgcYAkXFT1ENpUCjBZWc1TjAAFacUwdGZRNhTHx9cuo' then tx_from
else tx_to
end as wallet,
CASE
when tx_to LIKE 'HgcYAkXFT1ENpUCjBZWc1TjAAFacUwdGZRNhTHx9cuo' then amount
else -1 * amount
end as net_deposit,
sum(net_deposit) over (
partition by
wallet
ORDER by
block_timestamp
) as deposit_balance
FROM
solana.core.fact_transfers
WHERE
(
tx_to LIKE 'HgcYAkXFT1ENpUCjBZWc1TjAAFacUwdGZRNhTHx9cuo'
OR tx_from LIKE 'HgcYAkXFT1ENpUCjBZWc1TjAAFacUwdGZRNhTHx9cuo'
)
Run a query to Download Data