Considerando a tabela “A” abaixo, seus campos CHAVE e VALOR....
SELECT A.CHAVE
FROM A, (SELECT AVG (VALOR) AS VALOR2
FROM A)
WHERE A.VALOR = VALOR2
GROUP BY CHAVE
ORDER BY CHAVE
Teremos como retorno da consulta SQL:
FROM A, (SELECT AVG (VALOR) AS VALOR2
FROM A)
WHERE A.VALOR = VALOR2
GROUP BY CHAVE
ORDER BY CHAVE