permaryAverage Agents per Service
Updated 2024-11-10
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
-- Service Agent Analysis
with service_agents as (
select
service_id,
f.value::number as agent_id,
array_size(agent_ids) as agent_count
from crosschain.olas.ez_service_registrations,
table(flatten(agent_ids)) f
)
select
count(distinct agent_id) as total_agents,
avg(agent_count) as avg_agents_per_service,
--MIN(agent_count) as min_agents_per_service,
--MAX(agent_count) as max_agents_per_service,
--MEDIAN(agent_count) as median_agents_per_service,
-- Distribution of services by agent count
--count(case when agent_count = 1 then 1 end) as single_agent_services,
--count(case when agent_count > 1 then 1 end) as multi_agent_services
from service_agents;
QueryRunArchived: QueryRun has been archived