0% found this document useful (0 votes)
68 views1 page

Programming03 Handout 112 PDF

This document discusses data operations in SQL, including aggregation, eliminating duplicates, and aggregate functions. Aggregation involves combining data into groups to transform it into useful information. Eliminating duplicates removes redundant data entries using the DISTINCT keyword. Common aggregate functions include SUM to add column values, AVG to calculate the average, MIN and MAX to find lowest and highest values, and COUNT to count record numbers.

Uploaded by

Chad Jamias
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views1 page

Programming03 Handout 112 PDF

This document discusses data operations in SQL, including aggregation, eliminating duplicates, and aggregate functions. Aggregation involves combining data into groups to transform it into useful information. Eliminating duplicates removes redundant data entries using the DISTINCT keyword. Common aggregate functions include SUM to add column values, AVG to calculate the average, MIN and MAX to find lowest and highest values, and COUNT to count record numbers.

Uploaded by

Chad Jamias
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SH1680

Basic Data Operations in SQL


I. Summarizing Data

A. What is aggregation?
 a common programming term associated with the various methods in summarizing
data
 means to “combine into groups”
 allows data to be manipulated into something that is not merely displayed
 transforms data into “real” information: the pattern or context that is used as
requirement in order to transform data into something relevant

II. Eliminating Duplicates


 considered the most basic way of summarizing data
 done in order to prevent redundancy of data entries in query tables/results
 uses the DISTINCT keyword to remove duplicate rows from a query output,
placed immediately after the SELECT keyword

III. Aggregate Functions

A. Aggregate Function Keywords


 The SUM keyword will add values of a specified column.
 The AVG keyword will find the average of all given values in a specified column.
 The MIN keyword finds and returns the lowest value in a column.
 The MAX keyword finds and returns the highest value in a column.
 The COUNT keyword will count and return the number of records in a column.

References
 Coronel, C., Crockett, K., and Rob, P. (2012). Database systems: Design,
implementation & management. USA: Cengage Learning EMEA
 Singh, S. K. (2009). Database systems: Concepts, design and applications. India:
Pearson Education.
 Adamski, J. and Pratt, P. (2012). Database management systems (7th ed.). USA:
Cengage Learning
 Elmarsi, R. and Navathe, S. (2010). Fundamentals of database systems (6th ed.).
Pearson Education South Asia Pte. Ltd.
 Rockoff, L. (2011). The language of SQL. Cengage Learning.
 Korth, H., Silberschatz, A., and Sudarshan, S. (2011). Database system concepts
(6th ed.). New York. McGraw-Hill.

03 Handout 1 *Property of STI


Page 1 of 1

You might also like