Ask a Question
  
  
  
Top Posters
Since Sunday
208
110
25
24
22
22
21
21
21
20
20
19
New Topic  
wrote...
Posts: 279
Rep: 0 0
6 days ago
The following database will be used in this question:

GENERAL SALES DATABASE:

SALESREP
SalesRepNoRepNameHireDate
654Jones01/02/2005
734Smith02/03/2007
345Chen01/25/2018
434Johnson11/23/2004

CUSTOMER
CustNoCustNameBalanceSalesRepNo
9870Winston500345
8590Gonzales350434
7840Harris800654
4870Miles100345

Explain the use of the GROUP BY keyword. Include an example based on the CUSTOMER table from the General Sales database.
Source  Download Study Guide
Database Processing: Fundamentals, Design, and Implementation
Edition: 15th
Authors:
Read 61 times
2 Replies
Replies
wrote...
6 days ago
The GROUP BY keyword is used in conjunction with the built-in functions of SQL. The GROUP BY keyword is given a column that records are to be grouped on. Records in the result table are then collected into groups based on the value of the grouping column. The built-in function is then performed on the records of each group separately. For example,

SELECT AVG(Balance)
FROM CUSTOMER
GROUP BY SalesRepNo;

is a query that returns the average balance of all customers associated with a specific sales representative.
wrote...
6 days ago
Smart ... Thanks!
New Topic      
Share This Topic
Similar topics that might interest you...
Computer Studies   A year ago   pagnor   2 Replies   17 Views
Computer Studies   A year ago   Heff   jecko   1 Reply   24 Views
Computer Studies   A year ago   pagnor   2 Replies   12 Views
Computer Studies   A year ago   pagnor   ade9ja   1 Reply   15 Views
4 More
Explore
Post your homework questions and get free online help from our incredible volunteers.
Learn More
Improve Grades
Help Others
Save Time
Accessible 24/7
  72 People Browsing
 116 Signed Up Today
Related Images
 97
 92
 26
Your Opinion
In one word, how would you rate our website?
Votes: 70

Previous poll results: What's your favorite coffee beverage?