带where子句的SQL连接语句

带where子句的SQL连接语句

问题描述:

我有一个问题,要设法解决.我已经尝试了好几个小时,如果有人能指出我们正确的方向,那真是太好了.

I have this question, from I am trying to get through. I have been trying to do this for hours, it would be really great if someone could point us in the right direction.

这是德语,所以我要翻译成英文:

This is in german so I am going to translate it in English:

我们只对(d)部分有问题

We only have problem with part (d)

(d)编写一条SQL语句,该语句给出餐厅的名称和餐厅的Ort(地点),这些餐厅不订购任何沙拉.

(d) Write an SQL statement that gives names of the restaurant and Ort(Place) of the restaurant that do not order any Salat.

预期结果将是:

黑手党:哥廷根
威尼斯:卡塞尔(Kassel)

Da Mafia : Göttingen
Venezia : Kassel

您可以尝试如下操作:

  SELECT name,ort FROM kunde WHERE name NOT IN (SELECT DISTINCT(pizzeria) FROM Liefervertrag WHERE product='salat')