adriaparcerisasPunchswap swaps by asset
    Updated 8 hours ago
    with
    swaps as (
    select x.tx_hash, x.origin_from_address, x.contract_address, y.tx_fee, x.block_timestamp
    from flow.core_evm.fact_event_logs x
    join flow.core_evm.fact_transactions y
    on x.tx_hash=y.tx_hash
    where (lower(y.to_address)=lower('0xf45AFe28fd5519d5f8C1d4787a4D5f724C0eFa4d') or x.origin_function_signature='0x7ff36ab5')
    and x.tx_succeeded='TRUE'
    AND LOWER(x.contract_address) IN (
    '0x1b97100ea1d7126c4d60027e231ea4cb25314bdb',
    '0x7f27352d5f83db87a5a3e00f4b07cc2138d8ee52',
    '0xd3bf53dac106a0290b0483ecbc89d40fcc961f3e',
    '0x5598c0652b899eb40f169dd5949bdbe0bf36ffde',
    '0x9c7efd8ecd7c5e8b51a3833f6fb67c6e2f4f4a9b',
    '0x68eb683a393c8a1c816255b4fc4b89d73c52ad4b',
    '0xd8ad8ae8375aa31bff541e17dc4b4917014ebdaa',
    '0x995258cea49c25595cd94407fad9e99b81406a84',
    '0xec0f7e75128781c2924ad907a379909ae531d050',
    '0x6a2cd141d75864944318acf272443febc54855a9',
    '0x4dcd1b9a5103fa5f13cc4c3b758e05ffaccb4dd',
    '0x169bb04590fbf18b09739f951274aa5650dfccde',
    '0xd59d7c7f4d063a707a021c7c49c5cfb4faf94cb0',
    '0x40b0f603fd1165db32af769771428be100f8434e',
    '0x8b2f3a6e7ad5f971ff5d4e597a4ebc58b2d2758e',
    '0xd3378b419feae4e3a4bb4f3349dba43a1b511760',
    '0x2aabea2058b5ac2d339b163c6ab6f2b6d53aabed',
    '0xf1815bd50389c46847f0bda824ec8da914045d14',
    '0x3a33c904c132822ce01948ce318c15988727d1db'
    )
    ),
    news as (
    select distinct origin_from_address as swapper, contract_address, min(trunc(block_timestamp,'day')) as debut
    from swaps group by 1,2
    )
    select
    trunc(block_timestamp,'day') as date,