File size: 390 Bytes
4dc29ae
 
 
 
2c29ed1
4dc29ae
 
 
 
6791083
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
SELECT 
    s.space_id,
    s.title,
    s.description,
    s.url as space_url,
    s.tags,
    e.endpoint_url as schema_url,
    COUNT(t.tool_name) as tool_count
FROM spaces s
JOIN endpoints e ON s.space_id = e.space_id AND e.endpoint_type = 'schema'
JOIN tools t ON s.space_id = t.space_id
GROUP BY s.space_id, s.title, s.description, s.url, s.tags, e.endpoint_url
HAVING tool_count > 0;