0xsloaneBonkrewards: Deposits over Time
    Updated 2025-02-02
    -- forked from Bonkrewards: Deposits @ https://flipsidecrypto.xyz/edit/queries/21183159-7f34-4878-b311-ed34d8afdd1e
    -- Lock
    WITH transfers_to_bonk_rewards AS (
    SELECT tx_id
    ,tx_to
    ,tx_from AS user
    ,DATE_TRUNC('hour', fe.block_timestamp) AS date_hour
    ,amount AS bonk_amount
    ,amount * p.price AS amount_usd
    ,mint
    ,p.price
    FROM solana.core.fact_transfers fe
    INNER JOIN solana.price.ez_prices_hourly p
    ON fe.mint = p.token_address
    AND DATE_TRUNC('hour', fe.block_timestamp) = p.hour
    WHERE true
    AND block_timestamp::DATE BETWEEN DATEADD(day, -{{days_to_look_back}}, current_date()) AND current_date() - 1
    AND mint = 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263' -- this is the bonk that is transfered
    AND tx_to = '9AdEE8AAm1XgJrPEs4zkTPozr3o4U5iGbgvPwkNdLDJ3'
    --AND succeeded
    ),
    mint_actions AS (
    SELECT
    tx_id
    , event_type
    , mint
    , mint_amount
    , mint_authority
    , decimal
    , mint_amount * power(10, -1.0 * decimal) AS locked_bonk_amount
    FROM solana.defi.fact_token_mint_actions m
    WHERE TRUE
    AND block_timestamp::DATE BETWEEN DATEADD(day, -{{days_to_look_back}}, current_date()) AND current_date() - 1
    AND mint_authority = '9AdEE8AAm1XgJrPEs4zkTPozr3o4U5iGbgvPwkNdLDJ3'
    AND mint = 'FYUjeMAFjbTzdMG91RSW5P4HT2sT7qzJQgDPiPG9ez9o' --Locked BONK
    AND event_type = 'mintTo'
    Last run: 2 months ago
    DATE
    CNT_USERS
    BONK_AMOUNT
    LOCKED_BONK_AMOUNT
    TOKEN_AMOUNT_CONVERTED_USD
    BONK_AMOUNT_USD
    AVG_MULTIPLIER
    AVG_DEPOSIT_PER_USER
    1
    2024-12-23 00:00:00.0002725179556723.55014161459.534138774161666.748815566593.601228451
    2
    2025-01-14 00:00:00.00043534082683518.0639914300.960408162907574.2026152692101.841288295
    3
    2025-02-01 00:00:00.0002276055553144.10619142101.928702239143343.924040826625.999685913
    4
    2025-01-15 00:00:00.00035510470016360.4747297042.35587969295504.057703895836.739030647
    5
    2025-01-24 00:00:00.0004115992186217.6769184620.014521909185929.561485739449.197115625
    6
    2025-01-08 00:00:00.00012917746139264.367227776.482197716229008.099246087176.434145777
    7
    2024-12-07 00:00:00.00050412805491838.6115568589.858894505567142.9720246351128.154481934
    8
    2024-12-29 00:00:00.0002285254573637.80253166076.433384542166702.453101333728.405409581
    9
    2024-12-24 00:00:00.00034012444510757.3358402275.49966889402842.4577631681183.16323432
    10
    2024-12-26 00:00:00.0002994179095592.74478131678.345470964132319.574446925440.395804251
    11
    2024-12-12 00:00:00.00064710856451960.6445427237.019541924428283.009024091660.335424331
    12
    2025-01-10 00:00:00.0007037484952449.78672208900.847153743209027.711159627297.156254842
    13
    2024-12-05 00:00:00.00042916714755391.5432712096.122559887715943.8618846521659.897721585
    14
    2025-01-22 00:00:00.0005067305147657.8368236981.40787899237502.415172178468.342703318
    15
    2024-11-11 00:00:00.00062044808907940.19841154556.342940571151303.328747571862.187649904
    16
    2025-01-01 00:00:00.00030577017286378.6792262691.541196492272952.138231167418.660790808
    17
    2025-01-05 00:00:00.00038513566255559.9662478560.614918091477832.9276922671243.014584203
    18
    2024-12-01 00:00:00.0003359166734929.14518422007.237921354421273.4901956081259.723098273
    19
    2024-11-22 00:00:00.0003646566412203.74836332938.977933632333172.233365462914.667521796
    20
    2025-01-13 00:00:00.00033111760292789.6248310010.63865213310017.776197552936.588032182
    90
    9KB
    139s