Skip to content

Commit cb962b2

Browse files
authored
Add files via upload
add file
1 parent 59cabe8 commit cb962b2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Group by and Having in SQL.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Group By
2+
ex: SELECT name, MIN(fees) FROM student_reg GROUP BY name;
3+
+---------+-----------+
4+
| name | MIN(fees) |
5+
+---------+-----------+
6+
| RAM | 100000.23 |
7+
| SITA | 200000.12 |
8+
| HARI | 10000.52 |
9+
| BIMAl | 100200.00 |
10+
| SITA KC | 20000.12 |
11+
+---------+-----------+
12+
13+
Having
14+
ex:SELECT name, MIN(fees) FROM student_reg GROUP BY name HAVING MIN(fees) >100000;
15+
+-------+-----------+
16+
| name | MIN(fees) |
17+
+-------+-----------+
18+
| RAM | 100000.23 |
19+
| SITA | 200000.12 |
20+
| BIMAl | 100200.00 |
21+
+-------+-----------+

0 commit comments

Comments
 (0)