crear consulta 1
This commit is contained in:
parent
e0e021ff22
commit
93ecb23bc3
12
consulta.sql
Normal file
12
consulta.sql
Normal file
@ -0,0 +1,12 @@
|
||||
-- Consulta 1 de la guia
|
||||
SELECT CONCAT(A.NOMBRE, CONCAT(' ', A.APELLIDO)) AS NOMBRE_ATLETA
|
||||
FROM PARTICIPAR_PRECOMPETENCIA PP
|
||||
LEFT JOIN ATLETA A ON (PP.ID_ATLETA = A.ID_ATLETA)
|
||||
WHERE A.ID_ATLETA NOT IN (
|
||||
SELECT PC.ID_ATLETA
|
||||
FROM PARTICIPAR_COMPETENCIA PC
|
||||
LEFT JOIN COMPETENCIA C ON (C.ID_COMPETENCIA = PC.ID_COMPETENCIA)
|
||||
LEFT JOIN PRECOMPETENCIA P ON (P.COMPETENCIA = C.ID_COMPETENCIA)
|
||||
LEFT JOIN PARTICIPAR_PRECOMPETENCIA PP2 ON (PP2.ID_PRECOMPETENCIA = P.ID_PRECOMPETENCIA)
|
||||
WHERE (PC.ID_ATLETA = PP2.ID_ATLETA)
|
||||
);
|
Loading…
Reference in New Issue
Block a user