Professional Documents
Culture Documents
M. Kroenke
David M. Kroenke and David J. Auer
and David J. Auer
Database Processing:
Fundamentals, Design, and Implementation
d l d l
Chapter Two:
Introduction to
Structured Query
Structured Query
Language
g g
Modified & translated by Walter Chen
Dept. of Civil Engineering
National Taipei University of Technology
For classroom teaching purpose
For classroom teaching purpose
Wrong results!
NOTE: This SQL statement uses SQL Server 2008 R2 syntax—other DBMS
products use different concatenation and character string operators
operators.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition 2-56
© 2012 Pearson Prentice Hall
The SQL Keyword GROUP BY I
SELECT Department, Buyer,
COUNT(*) AS
Dept_Buyer_SKU_Count
FROM SKU DATA
SKU_DATA
GROUP BY Department, Buyer;
End of Presentation:
Chapter Two
Chapter Two