Home > database >  ORCLE tip not GROUP BY the sentence pattern how to deal with
ORCLE tip not GROUP BY the sentence pattern how to deal with

Time:10-06

The select a.o rdicode, a.c gicode, Amy polumbo urinvicode, a.c gcode, a.o thergattr1, (NVL (b.s umqtp, 0) - NVL (d.s umqtp, 0)) ZTQTP, (NVL (c.s. umqtp, 0) - NVL (d.s umqtp, 0)) ZKQTP from
(select Margaret spellings lcode, g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1 from storeslist m, where storeslistg g m.i slcode=g.i slcode and Margaret spellings heetcode='1210821' group by g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1) a

In the bonded area of * * * */
Left the join
(select g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1, sum (g.q tp) sumqtp from storeslist m, where storeslistg g m.i slcode=g.i slcode and Margaret spellings heetcode='1210821' and g.s code like '400%' and Margaret spellings tatus>='70' and g.s dc=1 group by g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1) b
On a.o rdicode=b.o rdicode and a.c gicode=biggest gicode and Amy polumbo urinvicode=p. urinvicode and a.c gcode=biggest gcode and a.o thergattr1=b.o thergattr1

/* * * * in the third-party warehouse/
Left the join
(select g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1, sum (g.q tp) sumqtp from storeslist m, where storeslistg g m.i slcode=g.i slcode and Margaret spellings heetcode='1210821' and g.s code like '300%' and Margaret spellings tatus>='70' and g.s dc=1 group by g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1) c
On a.o rdicode=c.o rdicode and a.c gicode=Arthur c. gicode and Amy polumbo urinvicode=c.p urinvicode and a.c gcode=Arthur c. gcode and a.o thergattr1=c.o thergattr1

/* * * * delivery/
Left the join
(select g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1, sum (g.q tp) sumqtp from salshiporder m, where Margaret spellings storeslistg g alshipicode=g. ainicode and Margaret spellings tatus> And Margaret spellings heetcode=='70', '1215621' group by g.o rdicode, right gicode, g.p urinvicode, right gcode, g.o thergattr1) d
On a.o rdicode=d.o rdicode and a.c gicode=, dc gicode and Amy polumbo urinvicode=d.p urinvicode and a.c gcode=, dc gcode and a.o thergattr1=d.o thergattr1
Group by a.o rdicode, a.c gicode, Amy polumbo urinvicode, a.c gcode, a.o thergattr1

CodePudding user response:

Remove the last line
Group by a.o rdicode, a.c gicode, Amy polumbo urinvicode, a.c gcode, a.o thergattr1

CodePudding user response:

Your statement is not grouping functions, don't need to use group by

CodePudding user response:

Also didn't see you useful aggregation function in the SELECT clause?
  • Related