0xHaM-dVolume in Total
    Updated 2024-08-18
    -- forked from Volume Over time @ https://flipsidecrypto.xyz/edit/queries/2708c53f-71bd-450f-b249-c9d71d761454

    WITH timeframe AS (
    SELECT
    date_day AS date
    FROM crosschain.core.dim_dates
    WHERE date_day <= CURRENT_DATE
    AND date_day >= '2024-01-01'
    ),
    asset_transfers AS (
    SELECT
    block_timestamp,
    TX_SIGNER AS from_address,
    TX_RECEIVER AS to_address,
    DEPOSIT/1e24 as amount
    FROM near.core.fact_transfers
    WHERE DEPOSIT > 0
    AND STATUS = 'true'
    ),
    cex_hot_wallets AS (
    SELECT
    address AS hot_wallet,
    project_name AS cex_name
    FROM near.core.dim_address_labels
    WHERE blockchain = 'near'
    AND label_type = 'cex'
    AND label_subtype = 'hot_wallet'
    ),
    cex_deposit_wallets AS (
    SELECT
    address AS deposit_address,
    project_name AS cex_name
    FROM near.core.dim_address_labels
    WHERE blockchain = 'near'
    AND label_type = 'cex'
    AND label_subtype = 'deposit_wallet'
    QueryRunArchived: QueryRun has been archived