Chapter 3 Structured Query Language (SQL) (2)
Chapter 3 Structured Query Language (SQL) (2)
Auer
Database Processing:
Fundamentals, Design, and Implementation
Chapter 3
Structured Query
Language
(SQL)
Chapter Objectives (DML)
• To understand the history and significance of Structured
Query Language (SQL)
• To understand the SQL SELECT/FROM/WHERE
framework as the basis for database queries
• To create SQL queries that use the SQL SELECT,
FROM, WHERE, ORDER BY, GROUP BY, and HAVING
clauses
• To create SQL queries that use the SQL DISTINCT,
AND, OR, NOT, BETWEEN, LIKE, and IN keywords
table
NOTE: This SQL statement uses SQL Server 2012 syntax—other DBMS
products use different concatenation and character string operators.
KROENKE AND AUER - DATABASE PROCESSING, 15th Edition 2-37
© 2019 Pearson Education, Inc.
The SQL Keyword GROUP BY I
SELECT Department, Buyer,
COUNT(*) AS
Dept_Buyer_SKU_Count
FROM SKU_DATA
GROUP BY Department, Buyer;
table
table
End of Presentation