October 2002
Beginner
864 pages
18h 41m
English
These functions are also referred to as group functions. They return a value based on the values in a column. (After all, you wouldn't ask for the average of a single field.) The examples in this section use the table TEAMSTATS:
SQL> SELECT * FROM TEAMSTATS;
NAME POS AB HITS WALKS SINGLES DOUBLES TRIPLES HR SO
------- ----- --- ---- ---- ----- ------ ------ --- ---
JONES 1B 145 45 34 31 8 1 5 10
DONKNOW 3B 175 65 23 50 10 1 4 15
WORLEY LF 157 49 15 35 8 3 3 16
DAVID OF 187 70 24 48 4 0 17 42
HAMHOCKER 3B 50 12 10 10 2 0 0 13
CASEY DH 1 0 0 0 0 0 0 1
6 rows selected.
The function COUNT returns the number of rows that satisfy the condition in the WHERE clause. Say you wanted to know how many ball ...
Read now
Unlock full access