12.07.2015 Views

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Aggregate FunctionsIf all we could do was run aggregate functionsonly over the entire set of records, they would notbe very useful.<strong>SQL</strong> provides two keywords, GROUP BY andHAVING, which give us much better control overhow the aggregate functions are <strong>to</strong> be applied.Queries that need <strong>to</strong> return both aggregatefunctions and ordinary column (field) values aresometimes called vec<strong>to</strong>r aggregates. These use theGROUP BY clause.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!