Computers and Technology

MYSQL: Your company has fallen on hard times, and you have to let some of your employees go. You figure it will be easier to fire an entire department all at once so now you want to determine which department itâs going to be.
Information about your employees and department is stored in two tables, Employee and Department, respectively. Here are their structures:
Department
Id: unique department id
Name: department name
Employee
Id: unique employee id
Full_name: employeeâs full name
Department: foreign key referencing department id
Salary: employeeâs salary
To choose the unfortunate department, you set a number of criteria you are willing to get rid of any department that has no more than 5 employees. Among these smaller departments you will consider those where the total salary of all of its employees is maximal. Lastly to make a tough situation more fair, you decide to make the final choice from the remaining departments at random. Thus, youâd like to build the following table of departments:
Select all departments with less than 6 employees
Sort these departments by the total salary of its worker in descending order (in the case of a tie, the department with the greatest number of employees should go first; if itâs still not enough to break a tie, the department with the smallest id should go first)
Cross out the departments at the even row and leave only those in the odd positions to consider them more thoroughly afterwards
Given tables employees and departments, your task is to write a select statement described above. The output should have columns dep_name (the name of the department), emp_number (the number of employees in this department), and total_salary (the sum of all employees' salaries in this department) and be sorted according to the specifications above.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:40, pnhandley01
Consider the simple 3-station assembly line illustrated below, where the 2 machines at station 1 are parallel, i. e., the product only needs to go through one of the 2 machines before proceeding to station 2.what is the throughput time of this process?
Answers: 2
image
Computers and Technology, 23.06.2019 03:10, nxusasmangaliso8780
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, babysisjessica1
For the following example of making a peanut butter and jelly sandwich, identify which are inputs, processes, or outputs: bread scooping and spreading peanut butter plate scooping and spreading jelly finished sandwich putting two pieces of covered bread together dirty plate crumbs
Answers: 2
image
Computers and Technology, 24.06.2019 00:20, danielmartinez024m
The guy wire bd exerts on the telephone pole ac a force p directed along bd. knowing the p must have a 720-n component perpendicular to the pole ac, determine the magnitude of force p and its component along line ac.
Answers: 2
Do you know the correct answer?
MYSQL: Your company has fallen on hard times, and you have to let some of your employees go. You fi...

Questions in other subjects: