lagandispensermint by asset
Updated 2022-05-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 mints as (
select
block_id,
case
when asset_transferred='386195940' then 'goETH'
when asset_transferred='386192725' then 'goBTC'
end as asset,
asset_amount/1e8 as minted,
asset_receiver,
tx_id
from algorand.asset_transfer_transaction where sender ='ETGSQKACKC56JWGMDAEP5S2JVQWRKTQUVKCZTMPNUGZLDVCWPY63LSI3H4' and asset_amount is not null
),
datetimes as (
SELECT
block_id,
block_timestamp
from algorand.block
),
final_data as (
SELECT
x.asset,
x.minted,
x.asset_receiver,
x.tx_id,
y.block_timestamp
from mints x, datetimes y where x.block_id = y.block_id
)
SELECT
trunc(block_timestamp,'day') as date,
asset,
sum(minted) as daily_minted,
sum(daily_minted) over (partition by asset order by date) as cum_minted,
count(distinct asset_receiver) as minters,
sum(minters) over (partition by asset order by date) as cum_minters,
count(distinct tx_id) as transactions,
sum(transactions) over (partition by asset order by date) as cum_transactions
Run a query to Download Data