Syntax : SELECT SUM(Column_Name) From Table_Name Where “Condition”; |
Example : Consider the student_details table. We can find the total sum of marks of students by using below query.
Table : student_details
Query : SELECT SUM(Marks) From student_details; |
Syntax : SELECT AVG(Column_Name) From Table_Name Where “Condition”; |
Example : Consider the student_details table. We can calculate the average of marks for the students using “AVG” function using below query.
Table : student_details
Query : SELECT AVG(Marks) From student_details table; |
Syntax : SELECT COUNT(Column_Name) From Table_Name Where “Condition”; |
Example : Consider the student_details table. If we want to “COUNT” the total number of students present in the table, it can be done using below query.
Table : student_details
Query : SELECT COUNT(Roll_No) From student_details; |
Syntax : SELECT MIN(Column_Name) From Table_Name Where “Condition”; |
Example : Consider the student_details table. If we want to select the minimum marks of a student, it can be done by executing below query.
Table : student_details
Query : SELECT MIN(Marks) From student_details; |
Syntax : SELECT MAX(Column_Name) From Table_Name Where “Condition”; |
Example : Consider the student_details table. If we want to select the maximum marks of a student, it can be done by executing below query.
Table : student_details
Query : SELECT MAX(Marks) From student_details; |