rezarwzDaily Trading Fee
    Updated 2024-06-28
    with all_launch as (
    SELECT
    INNER_INSTRUCTION:instructions [2] :parsed:info:newAccount :: string as sol_owner
    FROM
    solana.core.fact_events ev
    WHERE
    program_id = 'degenhbmsyzLpJUwwrzjsPyhPNvLurBFB4k1pBWSoxs'
    and INNER_INSTRUCTION:instructions [0] :parsed:type :: string = 'createAccount'
    and INNER_INSTRUCTION:instructions [1] :parsed:type :: string = 'initializeMint2'
    and SUCCEEDED = 'TRUE'
    and block_Timestamp >= '2024-05-17 01:15:51.000'
    )
    SELECT
    BLOCK_TIMESTAMP :: date as date,
    sum(AMOUNT * 0.01) as "Daily Total Trading Fee",
    sum(sum(AMOUNT * 0.01)) over(
    ORDER BY
    BLOCK_TIMESTAMP :: date asc
    ) as "Total Trading Fee",
    sum(count(DISTINCT tx_id)) over(
    ORDER BY
    BLOCK_TIMESTAMP :: date asc
    ) as "Total # of Trades",
    count(DISTINCT tx_id) as "Daily # of Trades"
    from
    solana.core.fact_transfers
    where
    block_Timestamp >= '2024-05-17 01:15:51.000'
    and MINT = 'So11111111111111111111111111111111111111112'
    and (
    tx_to in (
    SELECT
    sol_owner
    FROM
    all_launch
    )
    QueryRunArchived: QueryRun has been archived