omer93CAPPYS mints
    Updated 5 days ago
    with
    info as (
    SELECT
    tx_id, count(distinct CASE WHEN msg_type = 'wasm' AND attribute_key = 'token_id' THEN attribute_value END) AS nft_id,
    MAX(CASE WHEN msg_type = 'wasm' AND attribute_key = 'owner' THEN attribute_value END) AS minter,
    MAX(CASE WHEN msg_type = 'wasm' AND attribute_key = 'price' THEN attribute_value/pow(10,6) END) AS sei_price,
    MAX(CASE WHEN msg_type = 'wasm' AND attribute_key = 'group' THEN attribute_value END) AS group_type,
    MAX(CASE WHEN msg_type = 'wasm' AND attribute_key = 'minter' THEN attribute_value END) AS launchpad,
    MAX(CASE WHEN msg_type = 'wasm' AND attribute_key = 'collection' THEN attribute_value END) AS collection,
    MAX(CASE WHEN msg_type = 'wasm' AND attribute_key = 'action' THEN attribute_value END) AS action
    FROM
    sei.core.fact_msg_attributes
    where block_timestamp>'2024-02-08 17:00' and block_timestamp<'2024-02-11'
    GROUP BY
    tx_id
    having collection='sei1cujl8ujhc36lp7sr98x30u0aeqtjlj68kll5rqqr9dke5xvn2ltquzhysl'
    and action ='mint'
    )
    select
    group_type,
    count(distinct tx_id) as mints,
    sum(nft_id) as distinct_nft_minted,
    count(distinct minter) as minters,
    sum(sei_price) as sei_volume,
    avg(sei_price) as avg_nft_price,
    max(sei_price) as max_nft_price,
    count(distinct launchpad) as launchpads
    from info
    group by 1 order by 2 desc



    Last run: 5 days ago
    GROUP_TYPE
    MINTS
    DISTINCT_NFT_MINTED
    MINTERS
    SEI_VOLUME
    AVG_NFT_PRICE
    MAX_NFT_PRICE
    LAUNCHPADS
    1
    Whitelist1460146014602409001651651
    2
    Public7347347341211101651651
    3
    Presale582750240001
    4
    OG303303303499951651651
    4
    153B
    14s