I am learning Oracle 11g. I do not have any prior knowledge of it.

by Joel
(Ipaja, Lagos, Nigeria)

Select salary, department-id, last-name

From employees
Count(distinct department-id);

What is wrong with the query above? I need help please.

Comments for I am learning Oracle 11g. I do not have any prior knowledge of it.

Average Rating starstarstarstarstar

Click here to add your own comments

Jul 11, 2017
Rating
starstarstarstarstar

by: John

The error in your code is that count and distinct needs to be in the select statement in your code when selecting the columns to be used.


EG. SELECT COUNT (DISTINCT column-name)
FROM table-name

Click here to add your own comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Oracle Questions.