mysql - Invalid Use of a Group Function -


I seem to be looking for a solution to the simple problem. The query is broken only when I present the last amount () function in the clause, I get the error " Error code: 1111. Invalid usage of group function. " I do not understand That's why it will not allow me to get such a saying.

Query

  Select the interval of the week (dIntervalStart) WeekOfYear, Day of the Day (dIntervalStart) DayOfWeek, Dali (dIntervalStart as Time) CallVolume 'i.e. 0' between '07: 00 'and '17 and' CNN ('applicance', 'employer', 'fatefund', 'normal', 'other') and CRR Group = 'iWelkgrpqueuestats' from Intervalart, zodiac (nExternToInternAcdCalls) '*' And CASAID (time difference as in 30) and no dintervalStart (5, 6) and the amount (nExternToInternAcdCalls) & Gt; According to the dintervalStart ACA, dIntervalStart desc    

Previous> by group .. Yoga (NEXTenterAndDecall) & lt; & Gt; 0 by order ...

Where the rows are used, WHERE clauses are predicted, they choose which rows are included. Value of the total expression (such as SUM (foo) ) is not available when the rows are used. The value of that expression can not be determined until after rows .

Rows are predicted in the HAVING section after reaching, and ready after the result. When HAVING prediction is evaluated, the total ( SUM (foo) ) will be available.


Note: GROUP BY section usually includes all non-all expressions in the SELECT list. MySQL is more comfortable than other databases, which can be both a blessing and a curse; If the group renders "collapsed" rows for non-aggregates in the "Select" rows, then MySQL returns a value from a of rows.

That is, if you return to weekofiere (ef) by group, and return foo in SELECT list, and there are several rows with foo values Validate for the same weekofyear (foo) value, MySQL will return a line for the given weekofyear (foo) and a A will also return one of the rows. Other databases (Oracle, SQL Server, et al.) Throws an error instead of returning a result.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -