SELECT X.UsuaCodigo, X.NomeCompleto, X.Total, Y.TotalFones
FROM (SELECT C.UsuaCodigo, U.NomeCompleto, COUNT(C.Fones) AS Total
FROM Cliente AS C
INNER JOIN Usuario AS U
ON C.UsuaCodigo = U.UsuaCodigo
GROUP BY C.UsuaCodigo, U.NomeCompleto) AS X
INNER JOIN
(SELECT C.UsuaCodigo, U.NomeCompleto, COUNT(C.Fones) AS TotalFones
FROM Cliente AS C
INNER JOIN Usuario AS U
ON C.UsuaCodigo = U.UsuaCodigo
WHERE C.Fones <> ' '
GROUP BY C.UsuaCodigo, U.NomeCompleto) AS Y
ON X.UsuaCodigo = Y.UsuaCodigo
Bom dia.
Fiz dois selects:
Total de cadastros realizados por usuário Total de cadastros com telefone realizados por usuário
Como calculo a %?