cloudr3n2023-09-11 10:53 PM
    Updated 2024-02-01
    SELECT
    sum(amount),
    from_address
    from (
    SELECT
    block_timestamp,
    tx_hash,
    decoded_log:from as from_address,
    decoded_log,
    decoded_log:to as to_address,
    decoded_log:ERC20TokenValue*pow(10,-6) as amount
    --count(distinct decoded_log:to),
    --count(distinct origin_to_address)
    FROM
    polygon.core.ez_decoded_event_logs
    WHERE
    contract_address=lower('0xd2d74e2136d60a3c0d252c6de4102a82f2511def')
    and event_name='MerchantPayment'
    and decoded_log:ERC20Token='0xdc3326e71d45186f113a2f448984ca0e8d201995'
    --and decoded_log:tokenIds!=[3]
    )

    group by from_address
    order by 1 desc
    Last run: about 1 year ago
    SUM(AMOUNT)
    FROM_ADDRESS
    1
    2100
    0xebc180717a9012a51b7e67ac0057d5d6e78040d4
    2
    1516
    0xcbc20bd3b82aca9acf73113f54554e9f99e5dadd
    3
    1440
    0xb98a1aac3496d19cf1e0de16ea1157294e812a50
    4
    1308.7
    0xe036517f1c5577277a9fe442f43f670530f30a64
    5
    1130.5
    0x64b1ab364d0fc2a2df9e00ffbc65ab34dfb73b3d
    6
    728
    0x1f42faac716c6d1160db90222a9c8f4eb0fe6471
    7
    707
    0x0333bda590b695e77d41fbd5e7092c5d401e570f
    8
    392
    0xd8f44a4560adac582e16533d4df4f7fc71d6e0fe
    9
    349
    0x575fffd96a70aa2315158bb538b745b2371170e5
    10
    324
    0x2840054cfa8b9414ba9b1bf0bfbe4bf8e62e8146
    11
    317
    0x3e1950e270d19fbdce23dc95d8c522488c5034ba
    12
    293
    0x4651e83625d1dc1fb8054624d1dea48e2ffc63b8
    13
    266
    0xbcc1a921c6a62e998b78252ae8981ca0f099d8aa
    14
    238
    0x8b1dc5e0f77ee6882d1d7078a6ab740513eb964d
    15
    202.9
    0xc6905192b1e1064295f3591f6224297a6d287b99
    16
    187
    0x9e5ddc75ef810a15d04a61c8abbccef7330da305
    17
    126
    0xf6276e617c94e842aa64768e3a952433b2a91631
    18
    112
    0x2e387fea5f23e844e3123226d481b6fca7239d45
    19
    106
    0x9aa230b2a1817ae5b4841c7bd59705e48080bfc1
    20
    98
    0xb22f3350a53d8c1d399650738032c7a5f9021ccf
    ...
    685
    33KB
    11s