messariSocial Data - Programs, Tokens and Misc copy
    -- forked from anduril / Social Data - Programs, Tokens and Misc @ https://flipsidecrypto.xyz/anduril/q/OqlIQpg7meOu/social-data-programs-tokens-and-misc

    with
    compression_txs as (
    select distinct
    tx_id
    from
    solana.core.fact_events
    where
    date(block_timestamp) >= '2023-03-10'
    and program_id = 'BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'
    and signers[0] = '4WCBsTL4fHpg8qCt1wxoqRzgj2CZepdpmS5NaaoxPUJh'
    ),
    dialect_agg as (
    select
    date_trunc('month',block_timestamp) as month,
    'Dialect' as label,
    count(distinct tx_id) as txs, --mints
    count(distinct instructions[0]:accounts[1]) as wallets--collectors
    from
    solana.core.fact_transactions
    inner join compression_txs using (tx_id)
    where
    month between '2023-03-10' and date_trunc('month', current_date())
    and (
    log_messages[1] = 'Program log: Instruction: MintToCollectionV1'
    OR log_messages[1] = 'Program log: Instruction: MintV1'
    )
    and succeeded
    group by
    1
    ),


    social_transfers AS (
    SELECT
    Run a query to Download Data