We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a15e711 commit b2fe2f0Copy full SHA for b2fe2f0
11. GROUPBY.sql
@@ -0,0 +1,16 @@
1
+-- SYNTAX :-
2
+-- select ATT, AGGREGATE FUN from TABLENAME group by ATT;
3
+
4
5
+-- by default it will just fetch DISTINCT type data.
6
+Select Department from Employee group by Department;
7
8
+-- COUNT ( department, and their count);
9
+select Department, COUNT(Department) from Employee group by Department;
10
11
+-- AVG ( department, and their average salary);
12
+select Department, AVG(Salary) from Employee group by Department;
13
14
+-- MIN ( department, and their minimum salary);
15
+select Department, MIN(Salary) from Employee group by Department;
16
0 commit comments