w3resource
ankara escort
malatya escort
SQLite exercises

SQLite Exercise: Get the average salary and number of employees working the department 90

Write a query to get the average salary and number of employees working the department 90.

Sample table: employees


SQLite Code:

SELECT AVG(salary),count(*) 
FROM employees 
WHERE department_id = 90;

Output:

AVG(salary)       count(*)
----------------  ----------
19333.3333333333  3

Sqlite Online Editor


Structure of 'hr' database :

hr database

Improve this sample solution and post your code through Disqus.

Previous:Write a query to get the maximum salary of an employee working as a Programmer.
Next: Write a query to get the highest, lowest, sum, and average salary of all employees.

What is the difficulty level of this exercise?

New Exercises:R Programming