INNER JOIN, Products and Categories
I have the following Practice: You are working at a supermarket and you need to arrange products by categories. You are given the following tables: Each product has a category. Write a query to output all products with their categories (productname-price-categoryname) in one table. I have tried the folllowing: Select products.ID, categories.ID From products INNER JOIN categories ON products.ID = categories.ID; Select products.productname,products.price,categories.categoryname From products INNER JOIN categories ON products = categories; SELECT Products.categoryid, Categories.categoryname FROM Products INNER JOIN Categories ON Categories.categoryid=Categories.categoryname; SELECT Products.categoryid, Categories.categoryname FROM Products INNER JOIN Categories ON Categories.categoryid=Products.categoryname; SELECT Products.categoryname, Categories.categoryname, FROM Products INNER JOIN Categories ON Products.categoryid=Products.categoryname; No luck. Any suggestions?