I have to combine datas from two tables i have created in mySQL.
im supposed to figure out how many of each product that has arrived on any given day.
I have created the following query:
SELECT SUM(Amount) Shipment.Arrival_date,
Shipment.Shipment_ID,
`Product shipment`.Product_Code,
`product shipment`.Shipment_ID,
`product Shipment`.Amount
FROM `Product shipment`, `shipment`
WHERE `product Shipment`.Shipment_ID=`Product Shipment`.Product_code
AND Arrival_date = '2014-01-01
My two respective tables are called Shipment and Product Shipment.
Furthermore i have in my shipment table a collumn that describes the day of arrival, and the shipment_ID which is a primary key to a shipment_ID in my product shipment table.
In my product shipment table, the shipment_ID is described by a product_code and the Amount of the product.
My query returns with an #1064 error. Any suggestions on how to solve?