JUMLAH(expr) [klausul_lebih]
SELECT student.student_name,COUNT(*)
FROM student,course
WHERE student.student_id=course.student_id
GROUP BY student_name;
Returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement. The result is a BIGINT value.
SELECT student.student_name,COUNT(*)
FROM student,course
WHERE student.student_id=course.student_id
GROUP BY student_name;
If there are no matching rows, COUNT() returns 0. COUNT(NULL) returns 0.
SELECT COUNT(*) FROM student;