freemartianWayfinder Deposit & Increase Time
    Updated 1 hour ago
    WITH prices AS(
    SELECT
    hour::date AS price_day,
    AVG(price) AS price
    FROM ethereum.price.ez_prices_hourly
    WHERE token_address = '0xb23d80f5fefcddaa212212f028021b41ded428cf'
    AND hour::date >= '2024-06-01'
    GROUP BY 1
    ),

    deposits AS (
    SELECT
    block_timestamp,
    tx_hash,
    decoded_log:user AS user,
    decoded_log:amount / pow(10,18) AS amount,
    to_timestamp(decoded_log:createdTimestamp) AS createdTimestamp,
    to_timestamp(decoded_log:endTimestamp) AS endTimestamp,
    DATEDIFF(DAY, createdTimestamp, endTimestamp) AS difference_in_days,
    decoded_log:depositIndex AS depositIndex,
    decoded_log
    FROM ethereum.core.ez_decoded_event_logs
    WHERE contract_address = '0x4a3826bd2e8a31956ad0397a49efde5e0d825238'
    AND event_name = 'DepositCreated'
    AND block_timestamp::date >= '2024-06-01'

    ),

    addtime AS (
    SELECT
    block_timestamp,
    tx_hash,
    decoded_log:user AS user,
    -- decoded_log:amount / pow(10,18) AS amount,
    to_timestamp(decoded_log:createdTimestamp) AS createdTimestamp,
    to_timestamp(decoded_log:endTimestamp) AS newTimestamp,
    Last run: about 1 hour agoAuto-refreshes every 1 hour
    LABEL
    USERS
    $PRIME Amount
    1
    30 Months1130712327
    2
    7 Months5102379211
    3
    23 Months22786416
    4
    13 Months9076519
    5
    27 Months35111248332
    6
    35 Months248720401
    7
    31 Months1642243597
    8
    3 Months25688078434
    9
    22 Months94763
    10
    9 Months2841909197
    11
    19 Months275236
    12
    18 Months222981587
    13
    24 Months783703862
    14
    4 Months6403384237
    15
    10 Months158770117
    16
    17 Months5135695
    17
    33 Months137120770
    18
    Less Than 1 Month243470847
    19
    6 Months21486164742
    20
    1 Months25656597171
    37
    919B
    355s