-2
我需要創建一個查詢,以返回來自(州QLD)的所有客戶的firstName,lastName。併購買產品 - 產品名稱,類別,價格和庫存可用性,但不包含productID。我可以創建簡單的查詢,但沒有那麼複雜。在MYSQL中創建查詢
-Orders(orderID, ordertypeID, customerID, quantity, purchasedate)
-Customers(customer_ID, state, postcode, street_Number, street_Address, customer_Ln, customer_Fn)
-Order_Contents(orderID, productID, quantity)
-Products(product_ID, product_Category, product_Name, product_Description, unit_Price, in_Stock)
-Categories(categoryName, employeeID)
的所有客戶,不僅僅是訂單的那些 – Shadow
@Shadow,在這種情況下,將其更改爲外連接。我相信OP意味着客戶的名字。 – Rahul