Group By and Having The GROUP BY statement groups rows that have the same values into summary rows, like "find the number of customers in each dept". The GROUP BY statement is must be used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns. GROUP BY Syntax
SQL JOINS SQL Joins basically used for mapping the data from more than 1 tables. For correct out output we need to map correct respective columns. Following example will demonstrate how to use sql joins TYPES of SQL JOINS: followings are joins type in sql 1.Inner Join 2.Left Join 3.RIght Join 4.Full outer Join Table setup for Join example. Create Table CityMaster_k4Coding ( id bigint identity(1,1), CityName varchar(100) ) Create Table StudentMaster_k4Coding ( STudentName Varchar(100), Standard varchar(100), Admissiondate datetime , Cityid bigint ) Insert Into cityMaster_k4coding values ( 'MUMBAI' ) -- auto id 1 Insert Into cityMaster_k4coding values ( 'DELHI' ) -- auto id 2 Insert Into cityMaster_k4coding values ( 'PUNE' ) -- auto id 3 Insert Into cityMaster_k4coding values ( 'CHENNAI' ) -- auto id 4 Insert Into StudentMaster_k4Coding values ( 'ASHISH','X' ,ge...