कार्टेशियन उत्पाद का कारण यह है कि आप orders
. के साथ उप-चयन में शामिल नहीं हुए या Part
मेज़।
सबसे पहले आपको उस sub-select
की आवश्यकता नहीं है
SELECT customer.customer_name,
orders.order_date,
order_line.num_ordered,
order_line.quoted_price,
part.descript,
order_line.num_ordered * part.price AS amt_billed
FROM customer
JOIN orders
ON customer.customer_num = orders.customer_num
JOIN order_line
ON orders.order_num = order_line.order_num
JOIN part
ON order_line.part_num = part.part_num;