satsihNet Flows Historical
    Updated 2023-05-03
    with
    cex_labels as (
    SELECT
    *
    FROM
    near.core.dim_address_labels
    WHERE
    label_type = 'cex'
    ),
    near_prices as (
    SELECT
    date_trunc('hour', timestamp) as timestamp,
    symbol,
    avg(price_usd) as price_usd
    FROM
    near.core.fact_prices
    WHERE
    symbol = 'wNEAR'
    GROUP BY
    1,
    2
    ),
    inflows as (
    SELECT
    block_timestamp,
    tx_signer,
    tx_receiver,
    project_name,
    label_subtype,
    value_near,
    price_usd,
    value_near * price_usd as value_usd
    FROM
    (
    SELECT
    block_timestamp,
    Run a query to Download Data