GROUP BY clause is use to group the rows.
Syntax:
SELECT column1,groupfunction(column)
FROM TableName
WHERE Conditions
GROUP BY columns
HAVIN filters
ORDER BY columns;
How GROUP BY clause works:
SELCT job FROM EMP;
SELECT JOB FROM EMP GROUP BY EMP;
Guidelines:
Syntax:
SELECT column1,groupfunction(column)
FROM TableName
WHERE Conditions
GROUP BY columns
HAVIN filters
ORDER BY columns;
How GROUP BY clause works:
SELCT job FROM EMP;
SELECT JOB FROM EMP GROUP BY EMP;
Guidelines:
- Non group functional columns should be declare in GROUP BY clause
- WHERE clause will filter the records before the grouping the records.
- Columns aliases can not be used in GROUP BY clause.
- All the SELECT list column must be part of GROUP BY but all GROUP BY columns may not be part of SELECT list.
Thanks for sharing this oracle concepts. It is really helpful.
ReplyDeleteOracle course in Chennai | Oracle DBA Training in Chennai
Reach to the best Data Science Training institute in Chennai. for s/kyrocketing your career, Infycle Technologies. It is the best Software Training & Placement institute in and around Chennai, that also gives the best placement training for personality tests, interview preparation, and mock interviews for leveling up the candidate's grades to a professional level.
ReplyDelete