mexsanUntitled Query
    Updated 2021-11-22
    SELECT sum(event_amount_usd) AS total_usd, event_from_address_name, event_currency, date_trunc('day', block_timestamp) AS dt
    FROM terra.transfers
    WHERE event_from = 'terra1u9cgrrdd8e8qdlx63chdhl7af6t3y6lc9vu8j6'
    AND dt > CURRENT_DATE - 30
    AND event_currency IN ('LUNA', 'UST')
    GROUP BY 2,3,4
    UNION
    SELECT sum(event_amount_usd) *-1 AS total_usd, event_from_address_name, event_currency, date_trunc('day', block_timestamp) AS dt
    FROM terra.transfers
    WHERE event_to = 'terra1u9cgrrdd8e8qdlx63chdhl7af6t3y6lc9vu8j6'
    AND dt > CURRENT_DATE - 30
    AND event_currency IN ('LUNA', 'UST')
    GROUP BY 2,3,4
    Run a query to Download Data