pimi1356-HdnUm3Mint & burn
    Updated 2022-10-09
    with burn as (
    select
    date_trunc('{{date_range}}', block_timestamp) as date,
    count (distinct tx_id) as Burn_Count
    from solana.core.fact_events
    where program_id = 'HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
    and inner_instruction:instructions[0]:parsed:type = 'burn'
    and succeeded = 'TRUE'
    group by date ),

    Mint as (
    select
    date_trunc('{{date_range}}', block_timestamp) as date,
    count (distinct tx_id) as Mint_Count
    from solana.core.fact_events
    where program_id = 'HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
    and inner_instruction:instructions[0]:parsed:type = 'mintTo'
    and succeeded = 'TRUE'
    group by date ),

    transfer as (
    select
    date_trunc('{{date_range}}', block_timestamp) as date,
    count (distinct tx_id) as Transfers_Count
    from solana.core.fact_events
    where program_id = 'HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
    and inner_instruction:instructions[0]:parsed:type = 'transfer'
    and succeeded = 'TRUE'
    group by date )

    select 'Burn Ratio' as Type, date as datee, Burn_Count as TX
    from burn
    UNION
    select 'Mint Ratio',date, Mint_Count
    from mint
    UNION
    Run a query to Download Data