strawbettypercent and amount of the ALGOs in the AlgoVault
Updated 2022-04-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 data_tx as (
select
distinct tx_group_id
from
algorand.transactions
where
try_base64_decode_string(tx_message:txn:note::string) = 'Market: mt'
and tx_type = 'appl'
and tx_message:txn:apid = 465814318
), data_address as (
select
distinct receiver as address
from algorand.payment_transaction
where
tx_group_id in (select tx_group_id from data_tx)
)
, data_all_algo as (
select
'algo' as labeling,
sum(balance) as total from
algorand.account where address in (select address from data_address)
)
, data_algo_commit as (
select 'algo' as labeling, sum(total) as total from (
select
sender,
parse_json(replace(try_base64_decode_string(tx_message:txn:note::string), 'af/gov1:j')):"com"/pow(10,6) as total,
row_number() over (partition by sender order by sender) as nomor
from algorand.payment_transaction
where
sender in (select address from data_address)
and try_base64_decode_string(tx_message:txn:note::string) like 'af/gov1:j{"com":%'
) dd where nomor = 1
)
, data_algo_uncommit as (
select a.total - b.total as total from data_all_algo a join data_algo_commit b on a.labeling = b.labeling
Run a query to Download Data