Updated 2022-04-17
    with how_much_GARD_minted as (select sum(asset_amount/pow(10,6)) as minted_amount,to_date(block_timestamp) as mdate
    from algorand.asset_transfer_transaction where asset_id=684649988 and sender='J2E2XXS4FTW3POVNZIHRIHTFRGOWEWX65NFYIVYIA27HUK63NWT65OLB2Y'
    group by mdate)
    ,how_many_wallets as (select count(distinct asset_receiver) as minted_wallet,to_date(block_timestamp) as mdate from
    algorand.asset_transfer_transaction where asset_id=684649988 and sender='J2E2XXS4FTW3POVNZIHRIHTFRGOWEWX65NFYIVYIA27HUK63NWT65OLB2Y'
    group by mdate)
    , fee as ( select sum(fee) as fee_amount from algorand.payment_transaction where receiver='MTMJ5ADRK3CFG3HGUI7FS4Y55WGCUO5CRUMVNBZ7FW5IIG6T3IU2VJHUMM' )
    ,fee_overtime as (select sum(fee) as fee ,to_date(block_timestamp) as mdate from algorand.transactions where asset_id=684649988 group by mdate)
    ,algo as ( select sum(amount) as algo_amount from algorand.payment_transaction where receiver='MTMJ5ADRK3CFG3HGUI7FS4Y55WGCUO5CRUMVNBZ7FW5IIG6T3IU2VJHUMM')


    select 'How much has Gard.Money generated in ALGO fees : ' as subject, fee_amount from fee
    UNION
    select 'total amount of ALGO collateral currently backing the GARD : ' as subject ,algo_amount from algo



    Run a query to Download Data