AVG(TOTAL_AMOUNT) | MEDIAN(TOTAL_AMOUNT) | MAX(TOTAL_AMOUNT) | MIN(TOTAL_AMOUNT) | |
---|---|---|---|---|
1 | 129.293661972 | 31 | 1848.1 | 0.1 |
cloudr3nGrabSG - Average Voucher Used by Store
Updated 2024-02-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
›
⌄
-- decoded_log:to can be the same when origin_to_address is different
SELECT
avg(total_amount),
median(total_amount),
max(total_amount),
min(total_amount)
FROM (
SELECT
sum(amount) as total_amount,
to_address
from (
SELECT
block_timestamp,
tx_hash,
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 to_address
order by 1 desc
)
Last run: about 1 year agoAuto-refreshes every 12 hours
1
31B
36s