我是SQL开发中的新手。我不是在SQL好加入:(。按产品过滤订单
请帮我写一个SQL查询来提取在以下表格下面的Fileds的产品“一个家庭便携式激光去毛器”。
所需的Fileds:
orders.id,orders.order_price,orders.purchase_date,customers.email,product_orders.qty,products.name
表1:订单
id customer_id order_price purchase_date
1 1 0.20 12/6/2011
2 2 0.20 12/6/2011
3 1 0.20 12/6/2011
4 1 0.20 12/6/2011
5 1 0.20 12/7/2011
6 3 199.00 12/7/2011
7 4 199.00 12/7/2011
8 5 199.00 12/7/2011
9 6 199.00 12/7/2011
10 7 199.00 12/7/2011
表2:客户
id email name
1 [email protected] aa
2 [email protected] bb
3 [email protected] cc
4 [email protected] dd
5 [email protected] ee
6 [email protected] ff
7 [email protected] ss
表3:产品
id name
1 A Home Portable Laser Hair Remover
2 Ipad
3 android
4 Asus
5 s
6 10 inch Android
7 A Fabric Steamer Cleaner
8 A Magnetic Fly Screen Door
9 pillopw
10 LCD
表4:product_orders
id orders_id product_id qty
1 1 1 1
2 2 1 1
3 3 1 1
4 4 1 1
5 5 2 1
6 6 1 1
7 7 1 1
8 8 1 1
9 9 1 1
10 10 1 1
我想通过产品提取的产品ID 1或过滤器订单的所有订单
请帮我
您应该给出一个您想要提取的结果样本表。 – nnnn
嗨,我已经给出了4个表格作为例子。我只需要这些表“orders.id,orders.order_price,orders.purchase_date,customers.email,product_orders.qty,products.name”中的以下字段。 thx – Anam