U.S. Bank interview question

Write a SQL query to retrieve the average salary from a table.

Interview Answer

Anonymous

Feb 5, 2024

SELECT AVG(salary) AS average_salary FROM your_table_name; Replace "your_table_name" with the actual name of your table where the salary information is stored. This query calculates the average salary and aliases the result as "average_salary" for clarity.