marqububblegum.core.fact_nft_mints
    Updated 2024-02-05
    with

    fact_nft_mints_2024q1_call as (

    select

    f.value :DATE ::timestamp as date
    , f.value :MINT_TXS ::int as mint_txs
    , f.value :FEE_LAMPORTS ::int as fee_lamports

    from ( -- bubblegum.core.fact_nft_mints_2024q1
    select livequery.live.udf_api(
    'https://flipsidecrypto.xyz/api/v1/queries/e22508cf-ab41-46ea-91de-e4b3e76ff3b3/data/latest'
    ) :data as data
    ) response
    inner join lateral flatten (input => response.data) f
    ),

    daily_txs as (

    select
    block_timestamp
    , tx_id
    , fee / count(1) over (partition by tx_id) as fee
    from solana.core.fact_transactions
    inner join lateral flatten (input => log_messages) f_logs
    where succeeded
    and block_timestamp > '2023-11-01'
    and block_timestamp >= dateadd('day', 1, (select max(date) from fact_nft_mints_2024q1_call))
    and f_logs.value = 'Program log: Instruction: MintToCollectionV1'
    and log_messages[f_logs.index -1] like 'Program BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY invoke %'
    ),

    aggregated as (
    Last run: about 1 year ago
    DATE
    MINT_TXS
    FEE_LAMPORTS
    1
    2024-01-13 00:00:00.000278597012040316778
    2
    2024-01-17 00:00:00.00013019477384876903
    3
    2024-01-22 00:00:00.000283962510022083955
    4
    2024-01-18 00:00:00.00015997817567190274
    5
    2024-01-31 00:00:00.000378804813824606773
    6
    2024-02-01 00:00:00.000281634311096536365
    7
    2024-01-01 00:00:00.0001830801069289735
    8
    2024-01-20 00:00:00.0008282895661668935
    9
    2024-01-03 00:00:00.000242938622129027432
    10
    2024-01-29 00:00:00.000378869512640180657
    11
    2024-01-30 00:00:00.000476504215651406079
    12
    2024-01-05 00:00:00.000241704114852694728
    13
    2024-01-14 00:00:00.00013314786763464542
    14
    2024-01-02 00:00:00.0007002515706862833
    15
    2024-02-04 00:00:00.000428590014370517613
    16
    2024-01-16 00:00:00.00010163945607843810
    17
    2024-01-10 00:00:00.00027674879419212467
    18
    2024-01-19 00:00:00.00017237278815410424
    19
    2024-01-24 00:00:00.000287860511329063821
    20
    2024-01-07 00:00:00.000152864458836318714
    ...
    333
    15KB
    145s