23.回顾
SELECT t.relation, COUNT(*) AS count, AVG(c.age) AS avg_age
FROM tutorial t
UNNEST t.children c
WHERE c.age > 10
GROUP BY t.relation
HAVING COUNT(*) > 1
ORDER BY avg_age DESC
LIMIT 1 OFFSET 1Last updated
SELECT t.relation, COUNT(*) AS count, AVG(c.age) AS avg_age
FROM tutorial t
UNNEST t.children c
WHERE c.age > 10
GROUP BY t.relation
HAVING COUNT(*) > 1
ORDER BY avg_age DESC
LIMIT 1 OFFSET 1Last updated
{
"results": [
{
"avg_age": 17,
"count": 2,
"relation": "friend"
}
]
}