Reporting Aggregated Data Using the Group Functions Objectives 4 2 What Are

Reporting aggregated data using the group functions

This preview shows page 6 - 10 out of 52 pages.

Reporting Aggregated Data Using the Group Functions Objectives 4-2 What Are Group Functions? 4-3 Types of Group Functions 4-4 Group Functions: Syntax 4-5 Using the AVGand SUMFunctions 4-6 Using the MINand MAXFunctions 4-7 Using the COUNTFunction 4-8 Using the DISTINCTKeyword 4-9 Group Functions and Null Values 4-10 Creating Groups of Data 4-11 Creating Groups of Data: GROUP BYClause Syntax 4-12 Using the GROUPBYClause 4-13 Grouping by More Than One Column 4-15 Using the GROUP BYClause on Multiple Columns 4-16 Illegal Queries Using Group Functions 4-17 Restricting Group Results 4-19 Restricting Group Results with the HAVINGClause 4-20
Background image
viiUsing theHAVINGClause 4-21 Nesting Group Functions 4-23 Summary 4-24 Practice 4: Overview 4-25 5 Displaying Data from Multiple Tables Objectives 5-2 Obtaining Data from Multiple Tables 5-3 Types of Joins 5-4 Joining Tables Using SQL:1999 Syntax 5-5 Creating Natural Joins 5-6 Retrieving Records with Natural Joins 5-7 Creating Joins with the USINGClause 5-8 Joining Column Names 5-9 Retrieving Records with the USINGClause 5-10 Qualifying Ambiguous Column Names 5-11 Using Table Aliases 5-12 Creating Joins with the ONClause 5-13 Retrieving Records with the ONClause 5-14 Self-Joins Using the ONClause 5-15 Applying Additional Conditions to a Join 5-17 Creating Three-Way Joins with the ONClause 5-18 Nonequijoins 5-19 Retrieving Records with Nonequijoins 5-20 Outer Joins 5-21 INNERVersus OUTERJoins 5-22 LEFTOUTERJOIN5-23 RIGHTOUTERJOIN5-24 FULLOUTERJOIN5-25 Cartesian Products 5-26 Generating a Cartesian Product 5-27 Creating Cross Joins5-28 Summary 5-29 Practice 5: Overview 5-30 6 Using Subqueries to Solve Queries Objectives 6-2 Using a Subquery to Solve a Problem 6-3 Subquery Syntax 6-4 Using a Subquery 6-5
Background image
viiiGuidelines for Using Subqueries 6-6 Types of Subqueries 6-7 Single-Row Subqueries 6-8 Executing Single-Row Subqueries 6-9 Using Group Functions in a Subquery 6-10 The HAVINGClause with Subqueries 6-11 What Is Wrong with This Statement? 6-12 Will This Statement Return Rows? 6-13 Multiple-Row Subqueries 6-14 Using the ANYOperator in Multiple-Row Subqueries 6-15 Using the ALLOperator in Multiple-Row Subqueries 6-16 Null Values in a Subquery 6-17 Summary 6-19 Practice 6: Overview 6-20 7 Using the Set Operators Objectives 7-2 Set Operators 7-3 Tables Used in This Lesson 7-4 UNIONOperator 7-8 Using the UNIONOperator 7-9 UNION ALLOperator 7-11 Using the UNION ALLOperator 7-12 INTERSECTOperator 7-13 Using the INTERSECTOperator 7-14 MINUSOperator 7-15 Set Operator Guidelines 7-17 The Oracle Server and Set Operators 7-18 Matching the SELECTStatements 7-19 Matching the SELECTStatement: Example 7-20 Controlling the Order of Rows 7-21 Summary 7-22Practice 7: Overview 7-238 Manipulating Data Objectives 8-2 Data Manipulation Language 8-3 Adding a New Row to a Table 8-4 INSERTStatement Syntax 8-5 Inserting New Rows 8-6
Background image
ixInserting Rows with Null Values 8-7 Inserting Special Values 8-8 Inserting Specific Date Values 8-9 Creating a Script 8-10
Background image
Image of page 10

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture