Procura

Banco de dadosSql (3)


EXERCÍCIOS - Exercício 161

  • (FGV 2022)

Para o banco de dados happyhour, especificado anteriormente, assinale a expressão SQL que produz uma lista com os nomes dos clientes que frequentam todos os bares.


A)

select cliente from frequencia f1

where not exists

(select * from oferta where f1.bar= bar)



B)

select cliente from frequencia f1

where not exists

(select * from oferta

where not exists

(select * from frequencia f2

where f1.cliente = f2.cliente

and oferta.bar = f2.bar))



C)

select cliente from frequencia f1

where not exists

(select * from oferta

where not exists

(select * from frequencia f2

where f1.cliente <> f2.cliente

and oferta.bar <> f2.bar))



D) select cliente from frequencia

E)

select cliente from frequencia f1

where not exists

(select * from frequencia

where not exists

(select * from oferta f2

where f1.cliente = f2.cliente

and oferta.bar = f2.bar))




Próximo:
EXERCÍCIOS - Exercício 162

Vamos para o Anterior: Exercício 160

Tente Este: Exercício 134

Primeiro: Exercício 1

VOLTAR ao índice: Banco de dados






Cadastre-se e ganhe o primeiro capítulo do livro.
+
((ts_substr_ig=0.00ms))((ts_substr_id=5.32ms))((ts_substr_m2=0.00ms))((ts_substr_p2=0.58ms))((ts_substr_c=1.19ms))((ts_substr_im=0.80ms))
((total= 8ms))