freemartianDaily Swap From Assets
    Updated 2024-01-29
    -- forked from Daily Swap To Assets @ https://flipsidecrypto.xyz/edit/queries/6a1c1d8d-e0a1-4787-8f36-8c53cd43b3c5

    -- ambient address: 0xaaaaaaaaa24eeeb8d57d431224f73832bc34f688
    -- pool signature: 0xa15112f9

    with
    swap_from AS (
    SELECT block_timestamp, tx_hash, origin_from_address AS swaper, 'ETH' AS symbol,
    amount, amount_usd
    FROM ethereum.core.ez_eth_transfers
    WHERE eth_to_address = '0xaaaaaaaaa24eeeb8d57d431224f73832bc34f688'
    AND origin_function_signature != '0xa15112f9'

    UNION

    SELECT block_timestamp, tx_hash, origin_from_address AS swaper,
    (CASE
    when contract_address = '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2' THEN 'MKR'
    ELSE symbol END) symbol,
    amount, amount_usd
    FROM ethereum.core.ez_token_transfers
    WHERE to_address = '0xaaaaaaaaa24eeeb8d57d431224f73832bc34f688'
    AND origin_function_signature != '0xa15112f9'
    AND origin_function_signature NOT IN('0x729ad39e','0x60806040','0xece8c31c','0x616da87c','0x52efea6e')
    ),

    swap_to AS (
    SELECT block_timestamp, tx_hash, origin_from_address AS swaper, 'ETH' AS symbol,
    amount, amount_usd
    FROM ethereum.core.ez_eth_transfers
    WHERE eth_from_address = '0xaaaaaaaaa24eeeb8d57d431224f73832bc34f688'
    AND origin_function_signature != '0xa15112f9'

    UNION

    SELECT block_timestamp, tx_hash, origin_from_address AS swaper,
    Last run: over 1 year agoAuto-refreshes every 3 hours
    DAY
    TX_COUNT
    SWAPERS
    AMOUNT
    USD_AMOUNT
    SYMBOL
    1
    2024-01-29 00:00:00.000222857.776709912293.834193728SYN
    2
    2024-01-29 00:00:00.000110.0123.574618296swETH
    3
    2024-01-29 00:00:00.0002115021502.261220908DAI
    4
    2024-01-29 00:00:00.000252034.01092875576967.49ETH
    5
    2024-01-29 00:00:00.00011206.571677206.562012357USDT
    6
    2024-01-29 00:00:00.000110.3428328928668.342679373MKR
    7
    2024-01-29 00:00:00.0002411199723.885177146177.241708271USDC
    8
    2024-01-29 00:00:00.000110.000099941769580.2598735863wstETH
    9
    2024-01-28 00:00:00.00075522.711224522.692405871USDT
    10
    2024-01-28 00:00:00.00026446978.67929042938500.863215876SYN
    11
    2024-01-28 00:00:00.0003619345698.753572345902.124838907USDC
    12
    2024-01-28 00:00:00.000110.4885713037965.729581682MKR
    13
    2024-01-28 00:00:00.000220.4087059581969.638461205swETH
    14
    2024-01-28 00:00:00.0006833219.406302374498490.22ETH
    15
    2024-01-28 00:00:00.000324140.9460997084141.561046963DAI
    16
    2024-01-28 00:00:00.0001131.523770433915.135055684RPL
    17
    2024-01-28 00:00:00.000220.675724128342.79264776WBTC
    18
    2024-01-27 00:00:00.0007946113.118998535256454.99ETH
    19
    2024-01-27 00:00:00.0002819167189.963885167200.970598252USDC
    20
    2024-01-27 00:00:00.000330.00029671698810.7780240704wstETH
    ...
    1260
    80KB
    56s