Instruction
Great! We can't have products without producers, can we? Time for another table!
Exercise
The Producer table consists of two columns, similar to the Department table:
Id– the ID of a given food producer, andName– the name of the producer.
Okay! Let's make use of our new table straight away. For each product show its name, price, department name, and producer name.
Alias the columns as ProductName, ProductPrice, DepartmentName, and ProducerName, respectively.
Stuck? Here's a hint!
Type:
SELECT P.Name AS ProductName, P.Price AS ProductPrice, Prod.Name ProducerName, D.Name DepartmentName FROM Product P JOIN Producer Prod ON P.ProducerId = Prod.Id JOIN Department D ON D.Id = P.DepartmentId



