sharplesLogs of Leveraged Wallet
    Updated 2023-04-25
    -- Get all related transaction hashes related to transfers,
    WITH
    eth_transfers as (
    SELECT
    tx_hash
    FROM
    ethereum.core.fact_transactions
    WHERE
    from_address = '0xe47d5cc33517d5b8433ff249efe094b989989acc'
    or to_address = '0xe47d5cc33517d5b8433ff249efe094b989989acc'
    ),
    erc20_transfers as (
    SELECT
    tx_hash
    FROM
    ethereum.core.ez_token_transfers
    WHERE
    from_address = '0xe47d5cc33517d5b8433ff249efe094b989989acc'
    or to_address = '0xe47d5cc33517d5b8433ff249efe094b989989acc'
    ),
    aave_liq AS (
    SELECT
    tx_hash
    FROM
    ethereum.aave.ez_liquidations
    WHERE
    liquidator = '0xe47d5cc33517d5b8433ff249efe094b989989acc'
    ),
    comp_liq AS (
    SELECT
    tx_hash
    FROM
    ethereum.compound.ez_liquidations
    WHERE
    liquidator = '0xe47d5cc33517d5b8433ff249efe094b989989acc'
    ),
    Run a query to Download Data