Sobes.tech
Junior

How to calculate the average salary of employees in one resulting table?

sobes.tech AI

Answer from AI

SELECT
    AVG(salary) AS average_salary // Calculate the average value of the salary column and give it the alias average_salary
FROM
    employees; // Specify the table from which to retrieve data (assuming there is an "employees" table with a "salary" column)