You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
744 B

-- Consulta 1
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)
);
-- Consulta 2
SELECT P.NOMBRE, M.CANTIDAD_ATLETA
FROM MAX_ATLETA_ATLETISMO_PAIS M
LEFT JOIN PAIS P ON (P.ID_PAIS = M.ID_PAIS)
WHERE (M.CANTIDAD_ATLETA = (SELECT MAX(CANTIDAD_ATLETA) FROM MAX_ATLETA_ATLETISMO_PAIS));