hess0. Daily Inflow
    Updated 2025-04-14
    with layer_base as (select block_timestamp::Date as date,
    tx_hash,
    contract_address as token_address,
    '0x' || substr(TOPIC_1,27) as null_address,
    '0x' || substr(TOPIC_2,27) as user_address,
    case when contract_address = '0xf1815bd50389c46847f0bda824ec8da914045d14' then 'USDC'
    when token_address = '0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590' then 'WETH'
    when token_address = '0x2aabea2058b5ac2d339b163c6ab6f2b6d53aabed' then 'USDF'
    when token_address = '0x674843c06ff83502ddb4d37c2e09c01cda38cbc8' then 'USDT'
    when token_address = '0xfa0e06b54986ad96de87a8c56fea76fbd8d493f8' then 'USDF'
    when token_address = '0xea3910f1c6e687b59835885904a2fd1944b51ec6' then 'TRUMP' end as token_name,
    event_index,
    TOPICS,
    livequery.utils.udf_hex_to_int(DATA) as amount_raw,
    case when contract_address = '0xf1815bd50389c46847f0bda824ec8da914045d14' then amount_raw/pow(10,6)
    when token_address = '0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590' then amount_raw/pow(10,18)
    when token_address = '0x2aabea2058b5ac2d339b163c6ab6f2b6d53aabed' then amount_raw/pow(10,6)
    when token_address = '0x674843c06ff83502ddb4d37c2e09c01cda38cbc8' then amount_raw/pow(10,6)
    when token_address = '0xfa0e06b54986ad96de87a8c56fea76fbd8d493f8' then amount_raw/pow(10,6)
    when token_address = '0xea3910f1c6e687b59835885904a2fd1944b51ec6' then amount_raw/pow(10,18) end as amount
    from flow.core_evm.fact_event_logs
    where origin_to_address = '0xa20db4ffe74a31d17fc24bd32a7dd7555441058e'
    and tx_succeeded = 'TRUE'
    having null_address = '0x0000000000000000000000000000000000000000'
    )
    ,
    price as ( select hour::Date as date,
    case when symbol = 'WETH' then '0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590' else '0xea3910f1c6e687b59835885904a2fd1944b51ec6' end as tok_address,
    avg(price) as avg_price
    from crosschain.price.ez_prices_hourly
    where token_address in ('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2','6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN')
    group by 1,2)
    ,
    final as ( select a.date,
    a.tx_hash,
    user_address,
    Last run: 10 days ago
    DATE
    Addresses
    Transaction
    Volume (USD)
    Avg Volume Per Address (USD)
    Cum Volume (USD)
    Source Chain
    AVG
    MEDIAN
    MAX
    1
    2025-01-08 00:00:00.000371898.35632.7833333331898.351271.1928571434990
    2
    2025-01-15 00:00:00.0004539.99.9751959.4917.98519.9
    3
    2025-03-12 00:00:00.0001122970867.62171892388260.69288353821238844.1622361444130.3464417695387.552137811499950.684843
    4
    2025-02-21 00:00:00.00017321130405.59788166494.44693417712937507.2452835535325.17493378120.351157292499732.928683
    5
    2025-02-28 00:00:00.0001323468990.9098667536076.22383590417678132.3243737520390.9091246418136.108739812100000
    6
    2025-03-11 00:00:00.0005337284203.6963635095362.33389365120267976.540517244440.68275568256.93908660176869.872249
    7
    2025-03-28 00:00:00.00026761641713369.479803427266.58052309527425388.17730257263.917676583256.7316718767.848546
    8
    2025-03-10 00:00:00.00012559278403.5105138682227.22808411119983772.844153762032.14241251249.81363241289247.303173
    9
    2025-02-20 00:00:00.0004158556552.23151987513574.44467121611807101.647402559595.72812965373.80392625464691.3875
    10
    2025-02-17 00:00:00.000182225905.2591037421439.18106131911178870.663447561177.5117774435.2166587510863.91834125
    11
    2025-01-23 00:00:00.000110.0196650.019665501955.74832710.0196650.0196650.019665
    12
    2025-03-22 00:00:00.0002928188272.794672542302.30409134423780314.26945274300.247600927254.25866666712939.78
    13
    2025-02-24 00:00:00.000172744097.8086883722593.98874637512993224.112218151633.252173643527200.068641667
    14
    2025-04-07 00:00:00.000821924396.212257667115549.52653220830732991.0679961344018.8672503659999.78749823.086082
    15
    2025-02-12 00:00:00.000131762959.9042589024843.0695583778890311.1959082853703.5237799352.96446331320.01279
    16
    2025-03-25 00:00:00.0001160800552936.019979181476.66898274125110993.48710557473.404126695254.0320537573251.830751
    17
    2025-03-04 00:00:00.0002131435867.52885310720755.59661205319052267.2631304514060.2428662299.699667333199659.708589
    18
    2025-03-17 00:00:00.0001120782010.28259305971091.84387209622944394.16108539100.51412965312827.28505690.323321
    19
    2025-03-01 00:00:00.0001621484888.55311037930305.53456939918163020.8774841622040.38877774440.055827300000.408875
    20
    2025-02-19 00:00:00.000172034688.0179607372040.47164474911250549.415882641734.40089803793.57746270812999.92
    80
    9KB
    17s