db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r616747 - /db/derby/docs/trunk/src/ref/rrefselectexpression.dita
Date Wed, 30 Jan 2008 13:14:01 GMT
Author: tmnk
Date: Wed Jan 30 05:14:00 2008
New Revision: 616747

URL: http://svn.apache.org/viewvc?rev=616747&view=rev
Log:
- DERBY-2239 Example of SelectExpression for GROUP BY clause is mistaken - Patch by Jazarine
Jamal(jazarine at gmail dot com)

Modified:
    db/derby/docs/trunk/src/ref/rrefselectexpression.dita

Modified: db/derby/docs/trunk/src/ref/rrefselectexpression.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefselectexpression.dita?rev=616747&r1=616746&r2=616747&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefselectexpression.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefselectexpression.dita Wed Jan 30 05:14:00 2008
@@ -58,10 +58,10 @@
 -- 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)
+SELECT COUNT(*),WORK_DEPT,AVG(SALARY)
      FROM EMPLOYEE
-     GROUP BY WORKDEPT
-     ORDER BY 1</b></codeblock></p> <p>If there is no GROUP BY clause,
but
+     GROUP BY WORK_DEPT
+     ORDER BY 3</b></codeblock></p> <p>If there is no GROUP BY clause,
but
 a <i>SelectItem</i> contains an aggregate not in a subquery, the query is
 implicitly grouped. The entire table is the single group.</p> <p>The HAVING
 clause restricts a grouped table, specifying a search condition (much like



Mime
View raw message