Last active
April 11, 2017 17:12
-
-
Save ubiratanlima/c8eeb025cb554d5b0abaf6074ca77359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUERY("SELECT a.id, a.membro_id, a.cargosgrupo_id, pmais, pmenos, obsmsg, grupo_id, b.nivel | |
(SELECT nome from cargosgrupo where id = a.cargosgrupo_id) as nome_area, | |
(SELECT nome from usuario where id = a.membro_id) as nome_membro, | |
(SELECT nome from grupo where id = b.grupo_id) as nome_grupo, | |
SUM(pmais) AS totalPmais, SUM(pmenos) AS totalPmenos, | |
(SUM(pmais)-SUM(pmenos)) as percentual | |
FROM pontuacao a | |
INNER JOIN usuario b | |
ON a.membro_id = b.id | |
Where b.grupo_id = ".base64_decode($_SESSION['GRUPOID'])." | |
GROUP BY a.membro_id ORDER BY nome_membro ASC"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Preciso colocar mais um filtro onde o campo nivel contém o valor CONVIDADO.
Todos CONVIDADO deve ser excluido dessa query