hessMemecoins by Number of Buyers
    Updated 2024-11-26
    with base as ( select trunc(block_timestamp,'hour') as hourly,
    tx_hash,
    origin_from_address,
    pool_name,
    amount_in_usd,
    amount_out_usd,
    AMOUNT_IN,
    AMOUNT_Out,
    TOKEN_IN,
    TOKEN_out,
    symbol_in,
    symbol_out
    from avalanche.defi.ez_dex_swaps
    where token_out in (lower('0x420FcA0121DC28039145009570975747295f2329'),lower('0x184ff13B3EBCB25Be44e860163A5D8391Dd568c1'),lower('0xE8385CECb013561b69bEb63FF59f4d10734881f3'),lower('0xAcFb898Cff266E53278cC0124fC2C7C94C8cB9a5'),
    lower('0x4F94b8AEF08c92fEfe416af073F1Df1E284438EC'),lower('0x65378b697853568dA9ff8EaB60C13E1Ee9f4a654'),lower('0x8aD25B0083C9879942A64f00F20a70D3278f6187'),lower('0x694200a68B18232916353250955bE220e88c5cBB'),lower('0x5Ac04b69bDE6f67C0bd5D6bA6fD5D816548b066a'),lower('0x440aBbf18c54b2782A4917b80a1746d3A2c2Cce1'),
    lower('0x87bbfc9dcb66caa8ce7582a3f17b60a25cd8a248'),lower('0x223a368Ad0E7396165FC629976d77596a51F155C'))
    and block_timestamp::date >= '2024-01-01')
    ,
    price_base as ( select hour,
    token_address,
    price
    from avalanche.price.ez_prices_hourly)
    ,
    base1 as ( select hourly,
    tx_hash,
    origin_from_address,
    pool_name,
    amount_in_usd,
    amount_out_usd,
    TOKEN_IN,
    TOKEN_out,
    symbol_in,
    symbol_out,
    amount_in*b.price as amt_in_usd,
    amount_out*c.price as amt_out_usd,
    case when amount_in_usd is null then amount_out_usd else amount_in_usd end as volume_1,
    QueryRunArchived: QueryRun has been archived