smitetherGetting Started
    Updated 2024-11-19
    -- ethereum.core.fact_decoded_event_logs-- Get started with Flipside by running your first query:
    -- the SQL statement below will get you a list of NFT
    -- platforms on Ethereum, ranked by how many sales
    -- they've had in the past month.
    -- Be sure to see our documentation for more guidance,
    -- including a full walkthrough of the app:
    -- https://docs.flipsidecrypto.xyz/our-app/getting-started
    -- SELECT * FROM ethereum.core.dim_labels;
    -- SELECT * FROM ethereum.core.dim_labels WHERE LOWER(address) = LOWER('0x42106d74238f952A7CfF72Fb4eD4792b56253c40');
    -- select count(*) from ethereum.core.dim_labels;

    -- SELECT * FROM ethereum.core.fact_decoded_event_logs WHERE event_name = 'Claimed' and LOWER(contract_address) = LOWER('0x342F0D375Ba986A65204750A4AECE3b39f739d75') order by block_timestamp DESC;

    -- SELECT
    -- decoded_log:account AS account,
    -- decoded_log:amount AS amount,
    -- decoded_log:amountToLock AS amountToLock
    -- FROM ethereum.core.fact_decoded_event_logs
    -- WHERE event_name = 'Claimed'
    -- AND LOWER(contract_address) = LOWER('0x342F0D375Ba986A65204750A4AECE3b39f739d75')
    -- ORDER BY block_timestamp DESC;

    -- show columns in ethereum.defi.ez_dex_swaps;

    WITH claimed_accounts AS (
    SELECT
    decoded_log:account AS account
    FROM ethereum.core.fact_decoded_event_logs
    WHERE event_name = 'Claimed'
    AND LOWER(contract_address) = LOWER('0x342F0D375Ba986A65204750A4AECE3b39f739d75')
    )

    SELECT DISTINCT ca.account
    FROM claimed_accounts ca
    JOIN ethereum.defi.ez_dex_swaps s
    ON LOWER(ca.account) = LOWER(s.origin_from_address)
    QueryRunArchived: QueryRun has been archived