SalehDr_type_trade_date_symbol
    Updated 2024-01-26
    with lst_price as (
    select
    recorded_hour::date as price_date
    ,token_address
    ,upper(symbol) as symbol
    ,avg(close) as avg_price
    from solana.price.ez_token_prices_hourly
    group by 1,2,3
    )
    , lst_new_users as (
    select
    signers[0] as new_user
    ,min(block_timestamp::date) as min_date
    from solana.core.fact_events
    where block_timestamp::date>='2022-11-04'
    and program_Id='dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH'
    and SUCCEEDED = true
    group by 1
    )
    ,lst_new_users_week as(
    select
    count(new_user) as new_users_w
    from lst_new_users
    where min_date >= current_date - 6
    )

    ,lst_new_users_month as(
    select
    count(new_user) as new_users_m
    from lst_new_users
    where min_date >= current_date - 30
    )
    select
    date_trunc({{interval}}, block_timestamp)::date as date
    ,symbol
    ,-count(DISTINCT iff(tx_from='JCNCMFXo5M5qwUPg2Utu1u6YWp3MbygxqBsBeXXJfrw',tx_id,null)) as "Withdrawal Transaction"
    Last run: over 1 year ago
    DATE
    SYMBOL
    Withdrawal Transaction
    Deposit Transaction
    Withdrawers
    Depositors
    Cum Transactions
    Cum Deposit Transaction
    Cum Withdrawers
    Cum Depositors
    Cum Users
    Deposit $Volume
    Withdrawal $Volume
    Net $Volume
    1
    2022-10-31 00:00:00.000USDC-84442736444273111090.884852392-170.28655094710920.598301445
    2
    2022-10-31 00:00:00.000SOL-817589175813388.261516588-65.566781237322.694735351
    3
    2022-11-07 00:00:00.000USDC-12724041721492844599144126698.452390534-87235.67959503650383.371096942
    4
    2022-11-07 00:00:00.000SOL-9614231435515936518730019.458808532-20848.4069653439493.74657854
    5
    2022-11-14 00:00:00.000SOL-2212941842128453549314730083.479699402-21699.49273485517877.733543086
    6
    2022-11-14 00:00:00.000USDC-19533341592876178615824448969.126404449-44764.00332196754588.494179425
    7
    2022-11-21 00:00:00.000USDC-20979031658681407117223340306488.398210564-192496.952267782168579.940122206
    8
    2022-11-21 00:00:00.000SOL-71278848742041241102167269365927.110970035-298252.93528503685551.909228086
    9
    2022-11-28 00:00:00.000USDC-2794186912410071825186347533287247.203968507-282262.498780365173564.645310348
    10
    2022-11-28 00:00:00.000SOL-2733588281289159918424843278101.107089528-53960.822213235109692.194104378
    11
    2022-12-05 00:00:00.000SOL-21369675487722295259296555108629.379614094-55287.839178419163033.734540054
    12
    2022-12-05 00:00:00.000USDC-6737705897110425952444446883395079.40366851-3430778.25028607137865.798692784
    13
    2022-12-12 00:00:00.000SOL-17501888796891041833383647021017859.25193389-934189.667312981246703.319160959
    14
    2022-12-12 00:00:00.000USDC-191819857093117145803145378511180214.19946573-1083534.51450161234545.483656904
    15
    2022-12-19 00:00:00.000SOL-8078531351099565036473473946341718.231052084-301340.18551331287081.364699733
    16
    2022-12-19 00:00:00.000USDC-921111677155136656963916921083659289.515033137-435418.425182966458416.573507074
    17
    2022-12-26 00:00:00.000SOL-3063424160172105-551829196645578122333099858.7605461-33124962.3291364261977.79610949
    18
    2022-12-26 00:00:00.000USDC-2390830797100125825536493491817130833632080.7835997-33377339.3328299713158.024276961
    19
    2023-01-02 00:00:00.000USDC-522805594121625511916924347071072177996539223.9888714-96263144.0453021989237.967846234
    20
    2023-01-02 00:00:00.000SOL-5471551099218117-913480295863695155893741038.1338023-93767238.009314235777.920597814
    ...
    305
    39KB
    577s