I'm trying to select multiple columns from a single table, and to make it easier to see the data and make it easier to separate the columns, I've decided to use aliases.
But the problem is that when I run the query, it returns me the following error:
ORA-00923: keyword FROM not found where expected
My code looks like this:
SELECT MAX(salary) as 'Maximo Salário' ,
MIN(salary) as 'Minimo Salário',
SUM(salary) as 'Soma de Todos Salários',
AVG(salary) as 'Média Salarial' FROM employees
According to Oracle's own documentation, a column of a table with aliases is selected as follows:
column_name AS alias_name
So, what am I doing wrong here? Should there be any WHERE
in this SELECT
? But it is not obligatory to have it, only in cases where it is necessary to actually use it.
How can I correctly use aliases in this SELECT
?