Skip to Main Content
Data Analysis for Database Design, 3rd Edition
book

Data Analysis for Database Design, 3rd Edition

by David Howe
May 2001
Intermediate to advanced content levelIntermediate to advanced
336 pages
14h 36m
English
Butterworth-Heinemann
Content preview from Data Analysis for Database Design, 3rd Edition
COUNT(*) is a special version of COUNT that counts all the rows in a table, regardless
of whether there are nulls present. Otherwise, each function ignores nulls. The keyword
DISTINCT is used if duplicate values are to be eliminated before the function is
applied. SUM and AVERAGE may be used only on numeric data.
If an aggregate function is applied to an empty set of values, then COUNT returns
zero and the other aggregate functions return null.
Example 1
SELECT COUNT (*)
FROM employee
WHERE emp_name = 'Smith'
This statement counts the number of rows in the employee table for which
emp_name = 'Smith'.
Example 2
SELECT COUNT (room_no)
FROM telephone
This statement ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Quality Engineering in Financial Services

Data Quality Engineering in Financial Services

Brian Buzzelli

Publisher Resources

ISBN: 9780750650861