db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomohito Nakayama (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken
Date Sat, 13 Jan 2007 10:36:27 GMT
Example of SelectExpression for GROUP BY clause is mistaken
-----------------------------------------------------------

                 Key: DERBY-2239
                 URL: https://issues.apache.org/jira/browse/DERBY-2239
             Project: Derby
          Issue Type: Bug
          Components: Documentation
         Environment: http://db.apache.org/derby/docs/dev/ref/rrefselectexpression.html
            Reporter: Tomohito Nakayama


There is next example.

-- List head count of each department, 
-- the department number (WORKDEPT), and the average departmental salary (SALARY) 
-- for all departments in the EMPLOYEE table. 
-- Arrange the result table in ascending order by average departmental salary.
SELECT WORKDEPT, AVG(SALARY)
     FROM EMPLOYEE
     GROUP BY WORKDEPT
     ORDER BY 1

Comment told that head count of each department is listed, but not exaxtly.
I think count(*) is needed here.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message