I'm trying to get the number of customer orders from a customerOrders table where the gender is male from a customerDetails table. Could someone produce the query?
This is that i've attempted:
SELECT COUNT(customerOrders.orderid)
FROM customerOrders WHERE customerDetails.gender = 1
FROM customerDetails
customerDetails table:
name, customerID, gender
John, 17, 1
customerOrders table:
orderID,customerID
3, 17