1. Homepage
  2. Exam
  3. [2022] CSCI-UA 9479 Data Management and Analysis - Mid Semester Quiz - Q1 SQL Query

[2022] CSCI-UA 9479 Data Management and Analysis - Mid Semester Quiz - Q1 SQL Query

This question has been solved
Engage in a Conversation

1. A multinational company has offices (sites) in several cities. Each site has one or more departments (accounting, research, production, etc.). Every employee works at some site in a particular department. Every department at each site has a manager. Each employee undergoes an evaluation and the result of his or her evaluation is composed of `grade' which is an integer between 0 and 10 for various criterion: efficiency, productivity, innovation, inter-personal relation etc. CourseNana.COM

  CourseNana.COM

The schema is given as follows: (Primary keys are underlined) CourseNana.COM

• Department (Dep id, Dep name) CourseNana.COM

• Site (Site id, Site name, City, Country) CourseNana.COM

• Site Department (Site id, Dep id) CourseNana.COM

• Manager (Site id, Dep id, Emp id) CourseNana.COM

• Employee (Emp id, start date, Site id, Dep id, salary) CourseNana.COM

• Evaluation (Emp id, C id, grade) CourseNana.COM

• Criterion (C id, C name) CourseNana.COM

  CourseNana.COM

Write queries for the following (Use only mysql.connector package) (You can write all of these queries in a single python file and store the results in variables result1, result2,result3, result4, result5) CourseNana.COM

[2 points   5 = 10 points] CourseNana.COM


CourseNana.COM

(a) Retrieve all the department id and names of the departments that are located in France. CourseNana.COM

(b) Retrieve the list of countries in which is the average salary of employees the highest. CourseNana.COM

(c) Of the employees in the `Accounting' department, list the ones with the lowest ratings. (Here rating is the average score on all criteria is taken). CourseNana.COM

(d) Give the list of countries that have no 'Accounting' department, in the alphabetical order of the country names. CourseNana.COM

(e) Retrieve the Site(s) that has the smallest number of employees. CourseNana.COM


CourseNana.COM


CourseNana.COM

Get the Solution to This Question

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
CSCI-UA 9479代写,Data Management and Analysis代写,NYU Paris代写,Python代写,SQL代写,CSCI-UA 9479代编,Data Management and Analysis代编,NYU Paris代编,Python代编,SQL代编,CSCI-UA 9479代考,Data Management and Analysis代考,NYU Paris代考,Python代考,SQL代考,CSCI-UA 9479help,Data Management and Analysishelp,NYU Parishelp,Pythonhelp,SQLhelp,CSCI-UA 9479作业代写,Data Management and Analysis作业代写,NYU Paris作业代写,Python作业代写,SQL作业代写,CSCI-UA 9479编程代写,Data Management and Analysis编程代写,NYU Paris编程代写,Python编程代写,SQL编程代写,CSCI-UA 9479programming help,Data Management and Analysisprogramming help,NYU Parisprogramming help,Pythonprogramming help,SQLprogramming help,CSCI-UA 9479assignment help,Data Management and Analysisassignment help,NYU Parisassignment help,Pythonassignment help,SQLassignment help,CSCI-UA 9479solution,Data Management and Analysissolution,NYU Parissolution,Pythonsolution,SQLsolution,