w3resource
SQL exercises

SQL Exercises: Display the item name, price, and company name of all the products

SQL JOINS: Exercise-22 with Solution

Write a SQL query to display the item name, price, and company name of all the products.

Sample table: company_mast


Sample table: item_mast


Sample Solution:

SELECT item_mast.pro_name, pro_price, company_mast.com_name
   FROM item_mast 
     INNER JOIN company_mast
        ON item_mast.pro_com = company_mast.com_id; 

Output:

SQL Join Exercise

Query Visualization:

Duration:

Query visualization of Display the item name, price, and company name of all the products - Duration

Rows:

Query visualization of Display the item name, price, and company name of all the products - Rows

Cost:

Query visualization of Display the item name, price, and company name of all the products - Cost

Practice Online


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a SQL query to display all the data from the item_mast, including all the data for each item's producer company.
Next: Write a SQL query to display the average price of items of each company, showing the name of the company.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming