winnie-fsp2p stables sol - transfers vol agg program interactions copy
    Updated 2024-02-01
    -- forked from marqu / p2p stables sol - transfers vol agg program interactions @ https://flipsidecrypto.xyz/marqu/q/-ZEqsnn8OQis/p2p-stables-sol---transfers-vol-agg-program-interactions

    with

    stables as (

    select * from (
    values
    ('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', 'USDT', 6)
    , ('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', 'USDC', 6)
    , ('Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS', 'PAI', 6)
    , ('7kbnvuGBxxj8AG9qp8Scn56muWGaRaFqxg1FsRp3PaFT', 'UXD', 6)
    , ('USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX', 'USDH', 6)
    , ('9iLH8T7zoWhY7sBmj1WK9ENbWdS1nL8n9wAxaeRitTa6', 'USH', 9)
    , ('9TVjnzpF3X8DHsfVqYWoCGphJxtGYh1PDCFN5QmsHW5t', 'MDS', 9)
    ) as t(mint, symbol, decimals)
    ),

    transfer_txs as (

    select

    block_timestamp
    , tx_id
    , tx_from
    , tx_to
    , amount
    , symbol
    , mint

    from solana.core.fact_transfers
    inner join stables
    using(mint)
    where block_timestamp ::date > current_date() - interval '{{days}} days'
    ),

    Last run: over 1 year ago
    DATE
    CATEGORY
    AMOUNT
    AMOUNT_PCT
    USERS
    1
    2024-02-01 00:00:00.000Program Interaction14931208181.315596.191207032152303
    2
    2024-01-17 00:00:00.000p2p327506649.9524792.62331606331813
    3
    2024-01-19 00:00:00.000Program Interaction23047783049.92899.1886209686667
    4
    2024-01-20 00:00:00.000p2p139343504.9705051.08374674122530
    5
    2024-01-22 00:00:00.000p2p255582653.4914582.19113429525883
    6
    2024-01-10 00:00:00.000Program Interaction18612813082.277497.79891994971496
    7
    2024-01-03 00:00:00.000p2p488115420.4891422.38624840131630
    8
    2024-01-21 00:00:00.000Program Interaction6200508809.3678397.90703155586148
    9
    2024-01-18 00:00:00.000Program Interaction14128890455.434297.031423691810
    10
    2024-01-26 00:00:00.000Program Interaction22124021589.954798.804766878187408
    11
    2024-01-30 00:00:00.000p2p481008346.6871462.52350603438722
    12
    2024-01-19 00:00:00.000p2p188534611.1751120.8113790426049
    13
    2024-01-28 00:00:00.000p2p160348025.2081031.06116610837578
    14
    2024-01-30 00:00:00.000Program Interaction18580105045.346797.476493966163397
    15
    2024-01-15 00:00:00.000p2p271794814.7957792.3123088524152
    16
    2024-01-29 00:00:00.000Program Interaction20287862841.59798.287547032177632
    17
    2024-01-05 00:00:00.000p2p356114010.7872181.63257938126545
    18
    2024-01-11 00:00:00.000p2p511554619.8421412.98707680228782
    19
    2024-01-10 00:00:00.000p2p418903313.0287212.20108005126291
    20
    2024-01-12 00:00:00.000p2p328245031.9293962.01567104427592
    60
    5KB
    434s