option
Cuestiones
ayuda
daypo
buscar.php

SQL BD1

COMENTARIOS ESTADÍSTICAS RÉCORDS
REALIZAR TEST
Título del Test:
SQL BD1

Descripción:
SQL BD1 test

Fecha de Creación: 2026/05/26

Categoría: Otros

Número Preguntas: 18

Valoración:(0)
COMPARTE EL TEST
Nuevo ComentarioNuevo Comentario
Comentarios
NO HAY REGISTROS
Temario:

¿Cuáles son las ciudades en las que vive más de un suministrador?. select distinct ciudad from s, s x where s.ciudad = x.ciudad and s.sn<x.sn;. select distinct s.ciudad from s, s x where s.ciudad = x.ciudad and s.sn<>x.sn;. select distinct ciudad from s x where ciudad in(select ciudad from s where sn<>x.sn);. select distinct s.ciudad from s, s x where s.ciudad=x.ciudad and s.sn<x.sn;.

Obtener los códigos de las partes fabricadas en una ciudad en la que vive al menos un suministrador y en la cual se monta al menos un proyecto. select distinct pn from spj, p where spj.pn =p.pn and exists(select * from s where ciudad=p.ciudad) and exists(select * from j where ciudad=p.ciudad);. select pn from p where exists(select * from s where ciudad=p.ciudad) and exists(select * from j where ciudad=p.ciudad). select distinct pn from s, p, j, spj where s.sn=spj.sn and p.pn=spj.pn and j.jn=spj.jn and s.ciudad=p.ciudad and p.ciudad=j.ciudad. select distinct pn from p, s, j where p.ciudad=s.ciudad and p.ciudad=j.ciudad.

Obtener los códigos de las partes no usadas en el proyecto 'j1'. select pn from p minus select pn from spj where jn = 'j1';. select pn from p where pn not in(select pn from spj where jn='j1');. select pn from p where not exists(select * from spj where pn = p.pn and jn='j1');. select pn from p where not exists(select * from spj where pn p.pn and jn='j1');.

Obtener los códigos de los proyectos que no usan la parte 'p1'. select jn from j where jn not in(select jn from spj where pn='p1');. select jn from j minus select jn from spj where pn='p1';. select jn from j where not exists(select * from spj where jn=j.jn and pn='p1');. select jn from j where not exists(select * from spj here jn<>j.jn and pn='p1');.

Obtener los códigos de los proyectos que solo usan partes no vendidas por el suministrar 's1'. select distinct jn from spj where jn not in(select jn from spj where pn not in(select pn from spj where sn='s1'));. select distinct jn from j where jn not in(select jn from spj where pn in(select pn from spj where sn='s1'));. select distinct jn from spj x where not exists(select * from spj where jn=x.jn and pn in(select pn from spj where sn='s1'));. select distinct jn from spj where jn not in(select jn from spj where pn in(select pn from spj where sn='s1'));.

Obtener los códigos de los proyectos que usan todas las partes que no han sido vendidas por el suministrar 's1'. select jn from j where not exists(select pn from p where not exists(select * from spj where pn=p.pn and sn='s1')and not exists(select * from spj where jn=j.jn and pn=p.pn));. select jn from j where not exists(select pn from spj x where pn not in(select pn from spj where sn='s1') and not exists(select * from spj where jn=j.jn and pn=x.pn));. select jn from j where not exists(select pn from p where pn not in(select pn from spj where sn='s1') and not exists(select * from spj where jn=j.jn and pn=p.pn));.

Obtener los códigos de los suministradores que solo venden partes no usadas por el proyecto 'j1'. select sn from s where sn not in(select sn from spj where on in(select pn from spj where jn='j1'));. select distinct sn from spj where sn not in(select sn from spj where pn in(select pn from spj where jn='j1'));. select distinct sn from spj x where not exists(select * from spj where sn=x.sn and pn in(select pn from spj where jn='j1'));. select distinct sn from spj where sn not in(select sn from spj where pn not in(select pn from spj where jn='j1'));.

Obtener los códigos de los suministradores que venden cada parte roja a cada proyecto de Telde. select sn from s a where not exists(select pn from p b where color='rojo' and not exists(select sn, pn from s x, p y where not exists(select jn from j where ciudad='Telde' and not exists(select * from spj where sn=x.sn and pn=y.pn and jn=j.jn)) and sn=a.sn and pn=b.pn));. select sn from s where not exists(select pn, jn from p,j where color='rojo' and j.ciudad='Telde' and not exists(select * from spj where sn=s.sn and pn=p.pn and jn=j.jn));. select sn from s where not exists(select on from p x where not exists(select jn from j where ciudad='Telde' and not exists(select * from spj, p where spj.pn=p.pn and color='rojo' and p.pn=x.pn and jn=j.jn)) and not exists(select* from spj where pn=x.pn and sn=s.sn));.

Obtener los nombres de proveedores que vendan al menos una parte roja que haya sido usada por algún proyecto de Telde. select distinct snombre from s where sn in(select sn from spj x where exists(select * from spj y where pn=x.pn and 'Telde' = (select ciudad from j where jn=y.jn) and 'rojo' in(select color from p where pn=y.pn)));. select distinct snombre from s where sn in(select sn from spj where pn in(select pn from spj where jn in(select jn from j where ciudad='Telde') and pn in(select pn from p where color='color')));. select distinct snombre from s where sn in (select sn from spj x where exists (select * from spj where pn=x.pn and 'Telde'=(select ciudad from j where jn=x.jn) and 'rojo' in(select color from p where pn=x.pn)));.

¿Cuáles son las ciudades en las que vive más de un suministrador?. select distinct s.ciudad from s, s x where s.ciudad = x.ciudad and s.sn<>x.sn;. select distinct ciudad from s x where ciudad in(select ciudad from s where sn<>x.sn);. select distinct s.ciudad from s, s x where s.ciudad=x.ciudad and s.sn<x.sn;.

Obtener los códigos de las partes fabricadas en una ciudad en la que vive al menos un suministrador y en la cual se monta al menos un proyecto. select pn from p where exists(select * from s where ciudad=p.ciudad) and exists(select * from j where ciudad=p.ciudad). select distinc pn from p, s, j where p.ciudad=s.ciudad and p.ciudad=j.ciudad.

Obtener los códigos de las partes no usadas en el proyecto 'j1'. select pn from p minus select sn from spj where jn = 'j1';. select pn from p where pn not in(select pn from spj where jn='j1');.

Obtener los códigos de los proyectos que no usan la parte 'p1'. select jn from j where jn not in(select jn from spj where pn='p1');. select jn from j minus select jn from spj where pn='p1';. select jn from j where not exists(select * from spj where jn=j.jn and pn='p1');.

Obtener los códigos de los proyectos que solo usan partes no vendidas por el suministrador 's1'. select distinct jn from spj x where not exists(select * from spj where jn=x.jn and pn in(select pn from spj where sn='s1'));. select distinct jn from spj where jn not in(select jn from spj where pn in(select pn from spj where sn='s1'));.

Obtener los códigos de los proyectos que usan todas las partes que no han sido vendidas por el suministrador 's1'. select jn from j where not exists(select pn from p where not exists(select * from spj where pn=p.pn and sn='s1')and not exists(select * from spj where jn=j.jn and pn=p.pn));. select jn from j where not exists(select pn from p where pn not in(select pn from spj where sn='s1') and not exists(select * from spj where jn=j.jn and pn=p.pn));.

Obtener los códigos de los suministradores que solo venden partes no usadas por el proyecto 'j1'. select distinct sn from spj where sn not in(select sn from spj where pn in(select pn from spj where jn='j1'));. select distinct sn from spj x where not exists(select * from spj where sn=x.sn and pn in(select pn from spj where jn='j1'));.

Obtener los códigos de los suministradores que venden cada parte roja a cada proyecto de Telde. select sn from s a where not exists(select pn from p b where color='rojo' and not exists(select sn, pn from s x, p y where not exists(select jn from j where ciudad='Telde' and not exists(select * from spj where sn=x.sn and pn=y.pn and jn=j.jn)) and sn=a.sn and pn=b.pn));. select sn from s where not exists(select pn, jn from p,j where color='rojo' and j.ciudad='Telde' and not exists(select * from spj where sn=s.sn and pn=p.pn and jn=j.jn));.

Obtener los nombres de proveedores que vendan al menos una parte roja que haya sido usada por algún proyecto de Telde. select distinct snombre from s where sn in(select sn from spj x where exists(select * from spj y where pn=x.pn and 'Telde' = (select ciudad from j where jn=y.jn) and 'rojo' in(select color from p where pn=y.pn)));. select distinct snombre from s where sn in(select sn from spj where pn in(select pn from spj where jn in(select jn from j where ciudad='Telde') and pn in(select pn from p where color='color')));.

Denunciar Test