1. Write a SQL query to list first name, last name and rank of only professors whose rank is Assistant, Associate or full professor (where each rank is coded as ATP, AAP, and FP respectively).

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 6E
icon
Related questions
icon
Concept explainers
Question
100%
EMP_STAFF = "Y"
"AS"
STAFF
PK,FK1 EMP ID
ITSTAFF
PK,FK1 EMP_ID
STAFF_LEVEL
STAFF TYPE
"IT"
ACADSUPPORT
PK,FK1 EMP_ID
Current Data
Historic Data
IT_STAFF_GROUP
STAFF_TYPE
EMPLOYEE
PK EMP_ID
IT_STAFF_GROUP
EMP_LNAME
EMP FNAME
EMP INITIAL
EMP_HIREDATE
EMP STAFF
EMP ADMIN
EMP PROF
EMP_PROF="Y"
TECHSUPPORT
PK,FK1 EMP_ID
PROFESSOR
PK EMP ID
PK,FK1 EMP ID
H+
EMP_ADMIN "Y"
EMP_JOB_HIST
ADMIN
PK,FK1 EMP_ID
PROF SPECIALTY
PROF_RANK
"TS"
EMPLOYEE
EMP_LNAME
EMP_FNAME
has
EMP INITIAL
EMP_HIREDATE
EMP STAFF
EMP_ADMIN
EMP PROF
OPK
ADMIN_POSITION
OPK,FK1
PK,FK2
PK
Where Employee and Professor table part is extended as shown below
Hois dean of
HO
JOB_HIST
PK,FK1 EMP ID
PK,FK2 SCHOOL CODE
JH_DATE ASSIGN
TAKEN
JH_DATE_ENDED
JH EMP_SALARY
EMP_PROF "Y"
EMP ID
TRN_ID
TAKEN DATE
PK,FK1 EMP ID
TAKEN_TYPE
TAKEN_PASS
PK
PROFESSOR
SCHOOL
SCHOOL_CODE
SCHOOL_NAME
FK1 EMP ID
PROF_SPECIALTY
PROF_RANK
SCHOOL JOB_HIST
has
TRAINING
HPK TRN_ID
TRN_CATEGORY
Transcribed Image Text:EMP_STAFF = "Y" "AS" STAFF PK,FK1 EMP ID ITSTAFF PK,FK1 EMP_ID STAFF_LEVEL STAFF TYPE "IT" ACADSUPPORT PK,FK1 EMP_ID Current Data Historic Data IT_STAFF_GROUP STAFF_TYPE EMPLOYEE PK EMP_ID IT_STAFF_GROUP EMP_LNAME EMP FNAME EMP INITIAL EMP_HIREDATE EMP STAFF EMP ADMIN EMP PROF EMP_PROF="Y" TECHSUPPORT PK,FK1 EMP_ID PROFESSOR PK EMP ID PK,FK1 EMP ID H+ EMP_ADMIN "Y" EMP_JOB_HIST ADMIN PK,FK1 EMP_ID PROF SPECIALTY PROF_RANK "TS" EMPLOYEE EMP_LNAME EMP_FNAME has EMP INITIAL EMP_HIREDATE EMP STAFF EMP_ADMIN EMP PROF OPK ADMIN_POSITION OPK,FK1 PK,FK2 PK Where Employee and Professor table part is extended as shown below Hois dean of HO JOB_HIST PK,FK1 EMP ID PK,FK2 SCHOOL CODE JH_DATE ASSIGN TAKEN JH_DATE_ENDED JH EMP_SALARY EMP_PROF "Y" EMP ID TRN_ID TAKEN DATE PK,FK1 EMP ID TAKEN_TYPE TAKEN_PASS PK PROFESSOR SCHOOL SCHOOL_CODE SCHOOL_NAME FK1 EMP ID PROF_SPECIALTY PROF_RANK SCHOOL JOB_HIST has TRAINING HPK TRN_ID TRN_CATEGORY
1. Write a SQL query to list first name, last name and rank of only professors whose rank is
Assistant, Associate or full professor (where each rank is coded as ATP, AAP, and FP
respectively).
2. Write a MySQL query to show the number of people in each of the professor rank category
(which includes adjunct, instructor, visiting professor, assistant professor, associate professor
and full professor) and sort the result by the number of people in descending order.
3. Write a MySQL query to list the professor rank where the total number of people the rank is
more than 10 people.
4. Write a MySQL query to find names of the IT staff who completed the training (training ID = 5) and
the date they passed the training (assuming the date field in the table: TAKEN is of the Date type).
5. Write a MySQL query to find names of those who are both a full professor AND an IT staff who
completed at least 2 trainings and the dates they passed the training.
6. Write a MySQL query to find names of those who are either a full professor OR an IT staff who
completed at least 2 trainings or both.
7. Write a MySQL query to find those professors who have not served as a School Dean.
8.
Write a MySQL query to list all employees by Last name, First name and their EMP admin,
EMP staff and EMP Prof status ordered by Last name in alphabetical order. Last name and the
three status fields (administrator, staff and professor status) must be displayed all in uppercase
letter; first name is displayed with the first letter in uppercase and the rest all in lower case letters.
Transcribed Image Text:1. Write a SQL query to list first name, last name and rank of only professors whose rank is Assistant, Associate or full professor (where each rank is coded as ATP, AAP, and FP respectively). 2. Write a MySQL query to show the number of people in each of the professor rank category (which includes adjunct, instructor, visiting professor, assistant professor, associate professor and full professor) and sort the result by the number of people in descending order. 3. Write a MySQL query to list the professor rank where the total number of people the rank is more than 10 people. 4. Write a MySQL query to find names of the IT staff who completed the training (training ID = 5) and the date they passed the training (assuming the date field in the table: TAKEN is of the Date type). 5. Write a MySQL query to find names of those who are both a full professor AND an IT staff who completed at least 2 trainings and the dates they passed the training. 6. Write a MySQL query to find names of those who are either a full professor OR an IT staff who completed at least 2 trainings or both. 7. Write a MySQL query to find those professors who have not served as a School Dean. 8. Write a MySQL query to list all employees by Last name, First name and their EMP admin, EMP staff and EMP Prof status ordered by Last name in alphabetical order. Last name and the three status fields (administrator, staff and professor status) must be displayed all in uppercase letter; first name is displayed with the first letter in uppercase and the rest all in lower case letters.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can you Help me with Home work questions 2-8 please.

Solution
Bartleby Expert
SEE SOLUTION
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage