MYSQL [jsohn6]> SELECT COUNT ( PROF_NUM ) , DEPARTMENT_ID -> FROM COURSE ->GROUP BY DEPARTMENT_ID -> HAVING COUNT ( PROF_NUM) >1; COUNT (PROF_NUM) | DEPARTMENT_ID | 4 101 103 3 2 rows in set (0.01 sec) MySQL [jsohn6] > SELECT * FROM COURSE; | COURSE_TYPE | PROF_NUM | DE PARTM ENT_ID | COURSE_TITLE | COURSE_DESCRIPTION COURSE_TYPE_CODE 101 Costume Designs 101 Couture Fashion 101 Costume Designs 101 Textile Designs 201 Fine Arts 103 Computer Patterns 103 Web Retail 103 Web Design 202 Design with Technolo | Intro to Computer Design |Fundamentals of Cost ume Design F Fundamentals of Luxury Design | F Fundamentals of Costume Design F Fundamentals of Textile Design | F F T T | Fundamentals of Graphic Design | T | T 1 1 | FASH-100 FASH-110 FASH-120 3 7 FASH-150 Advanced Printmaking | Intro to Computer Patterns |Intro to Retail Ecommerce FASH-210 7 TECH-100 4 ТЕCH-110 TECH-120 4 TECH-200 2 9 rows in set (0.01 sec)

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 3.13CP
icon
Related questions
icon
Concept explainers
Question

Did I correctly perform the SQL query below (photo attached):

A query that contains the GROUP BY clause, one of the aggregate functions, the WHERE statement, and the HAVING operator

MYSQL [jsohn6]> SELECT COUNT ( PROF_NUM ) , DEPARTMENT_ID
-> FROM COURSE
->GROUP BY DEPARTMENT_ID
-> HAVING COUNT ( PROF_NUM) >1;
COUNT (PROF_NUM) | DEPARTMENT_ID |
4
101
103
3
2 rows in set (0.01 sec)
Transcribed Image Text:MYSQL [jsohn6]> SELECT COUNT ( PROF_NUM ) , DEPARTMENT_ID -> FROM COURSE ->GROUP BY DEPARTMENT_ID -> HAVING COUNT ( PROF_NUM) >1; COUNT (PROF_NUM) | DEPARTMENT_ID | 4 101 103 3 2 rows in set (0.01 sec)
MySQL [jsohn6] > SELECT * FROM COURSE;
| COURSE_TYPE | PROF_NUM | DE PARTM ENT_ID | COURSE_TITLE
| COURSE_DESCRIPTION
COURSE_TYPE_CODE
101 Costume Designs
101 Couture Fashion
101 Costume Designs
101 Textile Designs
201 Fine Arts
103 Computer Patterns
103 Web Retail
103 Web Design
202 Design with Technolo | Intro to Computer Design
|Fundamentals of Cost ume Design F
Fundamentals of Luxury Design | F
Fundamentals of Costume Design F
Fundamentals of Textile Design | F
F
T
T
| Fundamentals of Graphic Design | T
| T
1
1 |
FASH-100
FASH-110
FASH-120
3
7
FASH-150
Advanced Printmaking
| Intro to Computer Patterns
|Intro to Retail Ecommerce
FASH-210
7
TECH-100
4
ТЕCH-110
TECH-120
4
TECH-200
2
9 rows in set (0.01 sec)
Transcribed Image Text:MySQL [jsohn6] > SELECT * FROM COURSE; | COURSE_TYPE | PROF_NUM | DE PARTM ENT_ID | COURSE_TITLE | COURSE_DESCRIPTION COURSE_TYPE_CODE 101 Costume Designs 101 Couture Fashion 101 Costume Designs 101 Textile Designs 201 Fine Arts 103 Computer Patterns 103 Web Retail 103 Web Design 202 Design with Technolo | Intro to Computer Design |Fundamentals of Cost ume Design F Fundamentals of Luxury Design | F Fundamentals of Costume Design F Fundamentals of Textile Design | F F T T | Fundamentals of Graphic Design | T | T 1 1 | FASH-100 FASH-110 FASH-120 3 7 FASH-150 Advanced Printmaking | Intro to Computer Patterns |Intro to Retail Ecommerce FASH-210 7 TECH-100 4 ТЕCH-110 TECH-120 4 TECH-200 2 9 rows in set (0.01 sec)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr