SELECT ROUND((AVG(Salary) - AVG(CAST(REPLACE(Salary, 0, '') AS int)))+1) FROM Employees;
Monday, March 11, 2024
Samantha was tasked with calculating the average monthly salaries for all employees in the EMPLOYEES table, but did not realize her keyboard's key was broken until after completing the calculation. She wants your help finding the difference between her miscalculation (using salaries with any zeros removed), and the actual average salary. Write a query calculating the amount of error (i.e.: average monthly salaries), and round it up to the next integer.
Subscribe to:
Post Comments (Atom)
Samantha was tasked with calculating the average monthly salaries for all employees in the EMPLOYEES table, but did not realize her keyboard's key was broken until after completing the calculation. She wants your help finding the difference between her miscalculation (using salaries with any zeros removed), and the actual average salary. Write a query calculating the amount of error (i.e.: average monthly salaries), and round it up to the next integer.
SELECT ROUND((AVG(Salary) - AVG(CAST(REPLACE(Salary, 0, '') AS int)))+1) FROM Employees;
horizontal ads
-
using System; using System.Collections.Generic; using System.IO; namespace Solution { public class NotesStore { public IDict...
-
using System ; using System . Collections . Generic ; using System . IO ; using System . Linq ; namespace Solution { public class ...
-
import React , { useState } from "react" ; import "./index.css" ; function CustomerList (){ const [ customer ,...
Nice Blog, Thanks for Sharing this Information
ReplyDeleteBest Full Stack Training
Best Full Stack Training In Hyderabad