bachiaxl2
    Updated 2022-12-03
    with Prices as (
    select
    date_trunc('day', recorded_at) as Dates,
    avg (price) as Price
    from
    osmosis.core.dim_prices
    where
    symbol = 'AXL'
    group by
    1
    ),
    TXs as (
    select
    tx_id,
    trader,
    block_timestamp,
    (to_amount * Price) / pow(10, to_decimal) as "Volume ($USD)",
    to_amount / pow (10, to_decimal) as Amount
    from
    osmosis.core.fact_swaps Actions
    join Prices Side on Actions.block_timestamp :: date = Side.Dates
    where
    to_currency = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    and tx_status = 'SUCCEEDED'
    ),
    Bridges as (
    select
    Actions.block_timestamp as transfer_date,
    transfer_type,
    Side.block_timestamp as Date_Of_Buy,
    Actions.tx_id,
    Actions.sender,
    Actions.amount / pow(10, decimal) as Transfer_Amount
    from
    osmosis.core.fact_transfers Actions
    join TXs Side on (
    Run a query to Download Data