Afonso_DiazTop token pairs overtime
    Updated 2024-09-18
    with

    pricet as (
    select
    hour::date as date,
    symbol,
    token_address,
    avg(price) as price_usd
    from ethereum.price.ez_prices_hourly
    group by 1, 2, 3
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as user,
    case
    when amount_in_usd is not null then amount_in_usd
    when token_in in (
    '0x6c3ea9036406852006290770bedfcaba0e23a0e8',
    '0xdac17f958d2ee523a2206206994597c13d831ec7',
    '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
    '0x6b175474e89094c44da98b954eedeac495271d0f',
    '0xc5f0f7b66764f6ec8c8dff7ba683102295e16409',
    '0x0c10bf8fcb7bf5412187a595ab97a3609160b5c6',
    '0x0000000000085d4780B73119b644AE5ecd22b376',
    '0x4c9edd5852cd905f086c759e8383e09bff1e68b3',
    '0x853d955acef822db058eb8505911ed77f175b99e',
    '0x96f6ef951840721adbf46ac996b59e0235cb985c',
    '0x8e870d67f660d95d5be530380d0ec0bd388289e1',
    '0x056fd409e1d7a124bd7017459dfea2f387b6d5cd',
    '0x956f47f50a910163d8bf957cf5846d573e7f87ca'
    ) then amount_in
    when s1.price_usd is not null then amount_in * s1.price_usd
    end as amount_in_usdd,
    QueryRunArchived: QueryRun has been archived