permaryDaily leading stable coin transactions and volume on Solana
    Updated 2024-12-31
    with transfers as (
    select
    date_trunc('day', block_timestamp) as date,
    case
    when mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then 'USDC'
    when mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' then 'USDT'
    when mint = '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo' then 'PYUSD'
    when mint = 'A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6' then 'USDY'
    when mint = 'Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS' then 'PAI'
    when mint = 'DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT' then 'USDe'
    when mint = 'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o' then 'DAI'
    end as stablecoin,
    tx_id,
    amount
    from solana.core.fact_transfers
    where block_timestamp >= current_date - interval '60 days'
    and ( mint in (
    'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
    'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
    '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo',
    'A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6',
    'Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS',
    'DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT',
    'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o'
    )
    )
    )
    select
    date,
    stablecoin,
    count(distinct tx_id) as tx_count,
    sum(AMOUNT) AS volume
    from transfers
    group by date,stablecoin
    order by date desc;
    QueryRunArchived: QueryRun has been archived