Employee 'A' is asked to compute the average salary of all employees from the 'employee_salary' table. He calculated the average salary but realized that the zero key in his keyboard is not working after the result showed a very less average. He wants to finding out the actual average and difference between miscalculated average and actual average.
Table Schema:
CREATE TABLE employee_salary
(
emp_id INT NOT NULL,
name VARCHAR(50),
salary INT
)
INSERT INTO employee_salary(emp_id, name, salary)
VALUES(110, 'sam', 156),
(111, 'tina', 18),
(112, 'toto', 4),
(113, 'jack', 234),
(114, 'lewis', 32),
(115, 'george', 2),
(116, 'alex', 23),
(117, 'sheldon', 34),
(118, 'tom', 3),
(119, 'tony', 32)
0 Comments