cloudr3nAutonomous Service on Base chain
Updated 2024-05-17Copy Reference Fork
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
35
36
›
⌄
with
base as (
select
decoded_log:multisig as multisig
from
base.core.ez_decoded_event_logs
where
1=1
and event_name='CreateMultisigWithAgents'
and contract_address='0x3c1ff68f5aa342d296d4dee4bb1cacca912d95fe' -- Service Registry L2 (AUTONOLAS-SERVICE-L2-V1)
),
weekly_base as (
select
time,
sum(transaction_number) as total_weekly_transactions_number,
SUM(total_weekly_transactions_number) OVER (ORDER BY time) AS cumulative_transactions_number
from (
select
date_trunc('week',block_timestamp) as time,
to_address as service_multisig_address,
count(*) as transaction_number
from
base.core.fact_transactions
where
to_address in (select distinct multisig from base)
group by
time, to_address
)
group by
time
)
select * from weekly_base
order by time desc
QueryRunArchived: QueryRun has been archived