jackguyCopy of Squid Launch Analysis 100 - 44 copy
    Updated 2023-05-10
    -- forked from Copy of Squid Launch Analysis 100 - 44 @ https://flipsidecrypto.xyz/edit/queries/f9866fdc-3232-4f4c-810b-ef1d47d0c677

    with tab1 as (
    SELECT DISTINCT tx_hash
    FROM arbitrum.core.fact_token_transfers
    WHERE to_address LIKE lower('0xce16f69375520ab01377ce7b88f5ba8c48f8d666')
    --AND contract_address LIKE lower('0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed')
    ), tab2 as (
    SELECT DISTINCT tx_hash
    FROM arbitrum.core.fact_token_transfers
    WHERE to_address LIKE lower('0x0000000000000000000000000000000000000000')
    AND contract_address LIKE lower('0xEB466342C4d449BC9f53A865D5Cb90586f405215')
    ), tab3 as (
    SELECT DISTINCT tx_hash as tx_in
    FROM arbitrum.core.fact_token_transfers
    WHERE from_address LIKE lower('0x0000000000000000000000000000000000000000')
    AND contract_address LIKE lower('0xEB466342C4d449BC9f53A865D5Cb90586f405215')
    ), final1 as (
    SELECT
    tx_hash,
    block_timestamp,
    origin_from_address as tx_sender,
    avg(RAW_AMOUNT / power(10, 6)) as volume
    FROM arbitrum.core.fact_token_transfers
    WHERE tx_hash in (SELECT * FROM tab1)
    AND tx_hash IN (SELECT * FROM tab2)
    AND contract_address LIKE lower('0xEB466342C4d449BC9f53A865D5Cb90586f405215')
    GROUP BY 1,2,3
    ), final2 as (
    SELECT
    tx_hash,
    try_hex_decode_string(substr(data, 3 + (64*7), 16)) as to_chain
    FROM arbitrum.core.fact_event_logs
    WHERE tx_hash in (SELECT tx_hash from final1)
    AND topics[0] = '0x999d431b58761213cf53af96262b67a069cbd963499fd8effd1e21556217b841'
    Run a query to Download Data