SQL Concepts-3
In this blog we are going to understand some important queries... Created new database and tables for solving following queries : Union : Union removes duplicate records from data sets. Union first performs sorting operation and then eliminate duplicate records in data sets, after that they return combined data sets. Example : Union All : Union All keeps all records from each data sets. It also contains duplicate records. Example : Group By : Group by is used to group the rows that have same values or it is used to organize similar data into groups. Attribute i.e used in aggregate function cannot be in group by statement. The attribute used after group by statement and attribute used in aggregate function are only allowed if rather than this another attribute used, it shows error : Example : Order By : Order by is used to sort the data in ascending or descending order. Example : Subquery : Subquery is the query within another query and included within WHERE clause. The outer query is k...