Abolfazl_771025yawww total
    Updated 2022-09-25
    with yawww as( SELECT
    instruction:accounts as user,
    TX_ID,
    COALESCE(inner_instruction:instructions[4]:parsed:info:lamports * POWER(10, -9), 0) AS platform_fee,
    COALESCE(inner_instruction:instructions[5]:parsed:info:lamports * POWER(10, -9), 0) AS collection_royalty
    FROM solana.core.fact_events e
    LEFT JOIN solana.core.dim_labels l ON l.address = inner_instruction:instructions[0]:parsed:info:mint::string
    WHERE instruction:programId = '5SKmrbAxnHV2sgqyDXkGrLrokZYtWWVEEk5Soed7VLVN'
    )
    select
    'yawww with 0% royalty' as platform,
    count(tx_id) as "total count of transaction",
    count(DISTINCT user) as "total count of users"
    from yawww
    where collection_royalty = '0'
    and platform_fee = '0'
    union
    select
    'yawww with more than 0% royalty' as platform,
    count(tx_id) as "total count of transaction",
    count(DISTINCT user) as "total count of users"
    from yawww
    where collection_royalty > '0'
    and platform_fee > '0'
    Run a query to Download Data