kingneduEthereum Code for Project 1
    Updated 2024-11-10
    -- forked from king_obobo / Cohort Analysis Project 1 - ETH Table starter code @ https://flipsidecrypto.xyz/king_obobo/q/haOFP9KefLT-/cohort-analysis-project-1---eth-table-starter-code

    -- Joining all DeFi related tables into one big table
    -- This is the table I will be using to run my other queries

    WITH
    all_defi_users AS
    (
    SELECT
    block_timestamp,
    origin_from_address,
    tx_hash,
    event_name,
    platform,
    amount_usd
    FROM ethereum.defi.ez_bridge_activity
    UNION ALL
    SELECT
    block_timestamp,
    origin_from_address,
    tx_hash,
    event_name,
    platform,
    amount_in_usd AS amount_usd
    FROM ethereum.defi.ez_dex_swaps
    UNION ALL
    SELECT
    block_timestamp,
    origin_from_address,
    tx_hash,
    event_name,
    platform,
    amount_usd
    FROM ethereum.defi.ez_lending_borrows
    QueryRunArchived: QueryRun has been archived