SELECT distinct(`EQU-ID`),SELECT count( `EQU-PTS` ) AS PTS, count( `EQU-GLS` ) AS GLS, count( `EQU-NGL` ) AS NGL
FROM `REGPAR` AS x where x.`TOR-ID` = y.`TOR-ID` and x.`EQU-ID`= y.`EQU-ID` FROM `REGPAR` as y
Ete es el mesnaje de phpMyAdmin:
Cita:
consulta SQL: Documentación
SELECT DISTINCT (
`EQU-ID`
),
SELECT count( `EQU-PTS` ) AS PTS, count( `EQU-GLS` ) AS GLS, count( `EQU-NGL` ) AS NGL
FROM `REGPAR` AS x
WHERE x.`TOR-ID` = y.`TOR-ID`
AND x.`EQU-ID` = y.`EQU-ID`
FROM `REGPAR` AS y
MySQL ha dicho: Documentación
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count( `EQU-PTS` ) AS PTS, count( `EQU-GLS` ) AS GLS, count( `EQU-NGL` ) ' at line 1
SELECT DISTINCT (
`EQU-ID`
),
SELECT count( `EQU-PTS` ) AS PTS, count( `EQU-GLS` ) AS GLS, count( `EQU-NGL` ) AS NGL
FROM `REGPAR` AS x
WHERE x.`TOR-ID` = y.`TOR-ID`
AND x.`EQU-ID` = y.`EQU-ID`
FROM `REGPAR` AS y
MySQL ha dicho: Documentación
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count( `EQU-PTS` ) AS PTS, count( `EQU-GLS` ) AS GLS, count( `EQU-NGL` ) ' at line 1