@filiberto
To apply the AVG function on top of a select query in Oracle, you can use the following syntax:
1 2 |
SELECT AVG(column_name) as average_value FROM table_name; |
Replace column_name
with the column you want to calculate the average for, and table_name
with the name of the table you are querying from.
For example, if you want to find the average salary of employees in a table named employees
, you can use the following query:
1 2 |
SELECT AVG(salary) as average_salary FROM employees; |
This will calculate the average salary of all employees in the employees
table.