0xHaM-dCustom Chain Mesh - Quarterly Number of Transactions Since 2023 copy
Updated 2024-10-01
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
34
›
⌄
select
date_trunc('quarter', INSERTED_TIMESTAMP) as "Date",
case
when year(INSERTED_TIMESTAMP) = '2023' then concat('Q', quarter("Date"),'-','Months ','[',month("Date") ,' To ',month("Date") + 2,']','-', 23 )
when year(INSERTED_TIMESTAMP) = '2024' then concat('Q', quarter("Date"),'-','Months ','[',month("Date") ,' To ',month("Date") + 2,']','-', 24 )
end as "Quarter",
CASE when year(INSERTED_TIMESTAMP) = '2023' then 'y.2023' else 'y.2024' end as year,
count(distinct REQUEST_ID) as "Request Count",
round("Request Count" / count(distinct INSERTED_TIMESTAMP::date)) as "Average Daily Requests",
count(distinct SENDER_ADDRESS) as "Requestor Count",
round("Requestor Count" / count(distinct INSERTED_TIMESTAMP::date)) as "Average Daily Requestors",
round((("Request Count" / lag("Request Count") over (order by "Date")) - 1) * 100) AS "Change in Request in Percent",
round((("Requestor Count" / lag("Requestor Count") over (order by "Date")) - 1) * 100) AS "Change in Requestors in Percent",
sum("Request Count") over (order by "Date") AS "Total Requests",
from
crosschain.olas.ez_mech_activity
where
blockchain ilike ('{{Custom_Chain}}')
AND
INSERTED_TIMESTAMP::date >= '2023-01-01'
AND
INSERTED_TIMESTAMP::date < '2024-10-01'
GROUP BY 1,2,3
QueryRunArchived: QueryRun has been archived