嘿嘿不知道怎么弄了。。。。
它的功课:列出代码和购买汽车的消费者仅“阿根廷”国家。
Table sell:
customer | resell | veicle | date | value
---------+---------+-----------+------------+----------
02 | 01 | 03 | 2010-02-05 | 17500.00
04 | 02 | 01 | 2010-01-07 | 28000.00
01 | 03 | 08 | 2010-02-15 | 28000.00
02 | 03 | 02 | 2010-03-12 | 42000.00
03 | 04 | 06 | 2010-02-06 | 11500.00
03 | 02 | 05 | 2010-01-25 | 22100.00
01 | 01 | 04 | 2010-01-21 | 15500.00
表客户:
cod | name | lastname
--------+------------+------------
01 | Jose | Alves
02 | Paulo | Cunha
03 | Maria | DPaula
04 | Joana | Silveria
台车:
cod |manufacturer| model | year | country | price
--------+------------+-----------------+------+-----------+----------
01 | 01 | Gol | 2000 | Brasil | 25000.00
02 | 01 | Golf | 2005 | Argentina | 39000.00
03 | 04 | Ford Ka | 1990 | Brasil | 15000.00
04 | 03 | Corsa Seda | 1995 | Brasil | 12500.00
05 | 04 | Fiesta | 2003 | Argentina | 20000.00
06 | 03 | Corsa Seda | 1995 | Argentina | 10000.00
07 | 05 | Palio | 2002 | Brasil | 15000.00
08 | 05 | Siena | 2006 | Brasil | 26000.00
我猜它开始:
SELECT customer.cod, customer.name
FROM sell, customer
WHERE (SELECT cod
FROM veicle
WHERE veicle.country = 'Argentina') = sell.veicle;
只选择阿根廷汽车...请引导我找到答案。