Question
Which of the following SQL operations is used to combine
data from two or more tables based on a related column?Solution
The JOIN operation in SQL is used to combine rows from two or more tables based on a related column between them. This is essential in relational database management systems (RDBMS) when you need to combine data stored in separate tables based on a common field. There are various types of joins, such as INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN, which allow you to control how the data from the related tables is combined. JOIN is fundamental in SQL queries to link data across tables and perform meaningful analysis. The other options are incorrect because: • Option 2 (UNION) combines the results of two SELECT queries, but it does not join tables based on a common column. It simply appends rows from the result sets. • Option 3 (INTERSECT) returns only the rows that are present in both SELECT query results, which is different from joining tables. • Option 4 (SELECT) is a basic SQL command used to retrieve data from a database but does not combine tables. • Option 5 (GROUP BY) is used to group rows based on a specified column, typically for aggregation, and does not combine tables.
Profit percentage earned on selling article 'I' is the same as the percentage loss incurred on selling article 'J'. If the cost price of article 'I' is ...
- The cost price of item ‘Y’ is 75% of item ‘X’. If item ‘X’ is sold at a profit of 25% and item ‘Y’ at a loss of 20%, the total profit made ...
A man has 20 liters of pure alcohol. To make a 75% profit while selling it at the original cost price of alcohol, how many liters of water should he mix...
A man bought an article at 30% less of the marked price and sold it at 12% more than the marked price. Find the profit earned by him.
...A person named 'P' purchased a table for Rs. _____ and a bed for Rs. 1500. He marked the price of the table 20% higher than its c...
A table is sold at 32% profit after giving a discount of 34% on the marked price. If the marked price of the table is Rs. 3,000, then find the cost pric...
A shopkeeper purchases a batch of 120 pens for ₹240. He sells 60 pens at ₹5 each and the remaining pens at a 20% discount on the marked price of ₹...
- The marked price of a clothing item is 160 percent of its cost price. If a 10% discount is given at the time of sale, calculate the profit percentage.
Anjali sold 50% of her apples and was left with 25 less than 60% of what she originally had. Find the number of apples sold by Anjali.
The cost price of 24 articles is the same as the selling price of x articles. If the profit is 20%, then the value of x is