1) Create a query to return the total number of departments and the total number of distinct of zip codes….

Question:

1) Create a query to return the total number of departments and the total number of distinct of zip codes.2) Create a query to return the department number, job, and total amount of salary paid in each department to all employees. 3) Create a query to:A) Return the total amount of salary paid to all employees.B) Return the average of the maximum salaries of all the departments. Make an alias for result and name it “avg_max _sal”.4) Create a query to return both the minimum and maximum salary of all employees.5) Create a query to return the department number and the total number of employees (in the associated department) who makes less than $40,000.6) Create a query to return the department’s numbers, employee’s job, and the average of salaries in each department, also sort the result by department numbers. 7) Createa query to return the average employees’ salaries based on each department, also round the result by 3 digits to the right of decimal points.8) Create a query to return the average of the minimum salaries of all the departments. Also round the result with 3 decimal points.9) Create a query to return the department numbers and the total number of employees in departments 20 or 50. Also sort the result based on department number. 10) Make the correction in the following query:INSERTINTO order (ordno, ordname, orddesc) VALUE (701, ‘Laptop’, low inventory)INTO customer (custno, custname, ordno) VALUE (800, Jack Smith, 701)SELECT count(*) FROM orders, customer;

Expert Answer:

Answer rating: 100% (QA)

Answer 1 To return the total number of departments and the total number of distinct zip codes you can use the following query sql SELECT COUNT DISTINCT department AS total departments COUNT DISTINCT z

View the full answer