binhachonNFDomains - #4
Updated 2022-06-23
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 mint_txs as (
select
block_timestamp,
tx_group_id,
tx_message:dt:itx[0]:caid::float as asset_id,
tx_message:dt:itx[0]:txn:apar:an::string as name
from flipside_prod_db.algorand.application_call_transaction
where 1=1--tx_group_id = '7hqrg2ChPr36WtDBYLFtzOQMDqusRH33wfEoI95arRY='
and sender = 'OMXLQTI5ZSMWTCIZA3O3YBW74BTCOI67SZTOEDHK3ZEDZ34Z3DEOQD4PW4'
and tx_message:dt:itx[0]:txn:apar:an::string like '%.algo'
and try_base64_decode_string(tx_message:txn:apaa[0]::string) = 'mint'
),
price as (
select
tx_group_id,
sender,
sum(amount) as price
from flipside_prod_db.algorand.payment_transaction
where tx_group_id in (select tx_group_id from mint_txs)
and sender not in ('OMXLQTI5ZSMWTCIZA3O3YBW74BTCOI67SZTOEDHK3ZEDZ34Z3DEOQD4PW4', 'ABHE544MXL2CWMIZONAIUBNVELWYMKYKWBDNRLOEFQJN3LNF2ZWSMDEKBQ')
group by 1, 2
),
mint_with_price as (
select
mint_txs.*,
sender as buyer,
price
from mint_txs
inner join price on (mint_txs.tx_group_id = price.tx_group_id)
)
select
*,
row_number() over (order by price desc) as rank
from mint_with_price
order by price desc
limit 10
Run a query to Download Data