You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Tomohito Nakayama (JIRA)" <ji...@apache.org> on 2007/01/13 11:36:27 UTC

[jira] Created: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

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

        

[jira] Commented: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Tomohito Nakayama (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464433 ] 

Tomohito Nakayama commented on DERBY-2239:
------------------------------------------

I think next description is not correct in the example ....

-- Arrange the result table in ascending order by average departmental salary. 

1 is for WORKDEPT and not AVG(SALARY).

> 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

        

[jira] Commented: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Jazarine Jamal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563176#action_12563176 ] 

Jazarine Jamal commented on DERBY-2239:
---------------------------------------

I just looked upon this documentation and reproduced it in ij...
I have this proposed changes:


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

Please provide feedback on this.

> 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
>
> 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.


[jira] Updated: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Jazarine Jamal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Derby Info: [Patch Available]

> 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.


[jira] Updated: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dyre Tjeldvoll updated DERBY-2239:
----------------------------------

    Fix Version/s: 10.4.0.0

This issue has no fix version, but has been checked in to trunk after the 10.3 branch was cut, and has not been merged to the 10.3 branch (before the last release). 
(Some have been checked into trunk after 10.4 was cut and then merged to 10.4).

> 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
>             Fix For: 10.4.0.0
>
>         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.


[jira] Commented: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Tomohito Nakayama (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564011#action_12564011 ] 

Tomohito Nakayama commented on DERBY-2239:
------------------------------------------

I checked three kind output of singlepage,multi page and PDF.
There were no problem and I will commit 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.


[jira] Updated: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Jazarine Jamal (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Commented: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Tomohito Nakayama (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563181#action_12563181 ] 

Tomohito Nakayama commented on DERBY-2239:
------------------------------------------

I think that change is right.

> 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
>
> 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.


[jira] Assigned: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Jazarine Jamal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jazarine Jamal reassigned DERBY-2239:
-------------------------------------

    Assignee: Jazarine Jamal

> 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
>
> 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.


[jira] Resolved: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Jazarine Jamal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jazarine Jamal resolved DERBY-2239.
-----------------------------------

    Resolution: Fixed

> 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.


[jira] Commented: (DERBY-2239) Example of SelectExpression for GROUP BY clause is mistaken

Posted by "Tomohito Nakayama (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564012#action_12564012 ] 

Tomohito Nakayama commented on DERBY-2239:
------------------------------------------

I committed.

Sending        src/ref/rrefselectexpression.dita
Transmitting file data .
Committed revision 616747.

> 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.