db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jazarine Jamal (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken
Date Wed, 30 Jan 2008 10:36:35 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jazarine Jamal updated DERBY-2239:
----------------------------------

    Attachment: newref.zip
                DERBY2239-ref.diff

I have made changes to the file trunk/src/ref/rrefselectexpression.dita.

The following lines :

SELECT WORKDEPT, AVG(SALARY)
     FROM EMPLOYEE
     GROUP BY WORKDEPT
     ORDER BY 1

have been replaced with:

SELECT COUNT(*),WORK_DEPT,AVG(SALARY)
     FROM EMPLOYEE
     GROUP BY WORK_DEPT
     ORDER BY 3; 

I build the new file with ant html and the resulting html page: rrefselectexpression.html
contains the corrected code.

The file newref.zip contains the corrected page. Please have a look at it.

> 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
>            Assignee: Jazarine Jamal
>         Attachments: DERBY2239-ref.diff, newref.zip
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message