strawbetty Inflow daily and cumulative amount of UST that goes through that bridge
    Updated 2022-04-24
    with OUTFLOW as
    (SELECT date_trunc('day',block_timestamp) as day,
    sum(event_attributes:amount[0]:amount::float/1e6) as outflow_amount,
    sum(outflow_amount) over(order by day asc) as cumulative_outflow_volume,
    count(distinct event_attributes:sender::string) as outflow_bridgers,
    count(distinct tx_id) as outflow_transactions
    from terra.msg_events where block_timestamp>='2022-02-01'
    and tx_status='SUCCEEDED' and event_type='transfer'
    and event_attributes:amount[0]:denom::string='uusd'
    and event_attributes:recipient::string='terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf'
    group by 1),
    INFLOW as
    (SELECT date_trunc ('day',block_timestamp) as day,
    sum(event_attributes:amount[0]:amount::float/1e6) as inflow_amount,
    sum(inflow_amount) over(order by day asc) as cumulative_inflow_volume,
    count(distinct event_attributes:recipient::string) as inflow_bridgers,
    count(distinct tx_id) as inflow_transactions
    from terra.msg_events where block_timestamp>='2022-02-01'
    and tx_status='SUCCEEDED' and event_type='transfer'
    and event_attributes:amount[0]:denom::string='uusd'
    and event_attributes:sender::string='terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf'
    group by 1)
    SELECT OUTFLOW.day, outflow_amount,inflow_amount, cumulative_outflow_volume,cumulative_inflow_volume,
    outflow_bridgers,inflow_bridgers,outflow_transactions,inflow_transactions
    from OUTFLOW
    join INFLOW on OUTFLOW.day= INFLOW.day
    order by 1 desc
    Run a query to Download Data