Home » SQL & PL/SQL » SQL & PL/SQL » Not a single-group function
Not a single-group function [message #272667] Fri, 05 October 2007 22:53 Go to next message
Snehal G. Sutaria
Messages: 1
Registered: September 2007
Location: Kalol
Junior Member
hi!
Dear all
please refer given queries and help me to solve this problem..
"ORA-00937:not a single-group group function'
Errors shown when i fired this qry.

SELECT
MAX(SUM(a.weight_per_meter)),
a.sortnumber,
b.ATTRIBUTE1 beam_chit_no
FROM
sntx_sortmaster_warp a,
APPS.GME_MATERIAL_DETAILS B
WHERE
a.weight_per_meter>0 AND
a.SORTNUMBER=b.ATTRIBUTE16
GROUP BY
a.sortnumber,
b.ATTRIBUTE1

Thanks
Snehal

Re: ORA-00937: not a single-group group function [message #272671 is a reply to message #272667] Fri, 05 October 2007 23:42 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
Snehal G. Sutaria,
On you very 1st post you hijack a dormant thread, do not read & follow any posting guidelines as stated in #1 STICKY post at the very top of this forum & expect to have your problem solved.

If/when you assign an alias, perhaps you should use it consistantly.
Re: ORA-00937: not a single-group group function [message #272673 is a reply to message #272671] Sat, 06 October 2007 00:28 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Split messages to a new topic
Re: Not a single-group function [message #272677 is a reply to message #272667] Sat, 06 October 2007 00:37 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Explain what you want to do.

Regards
Michel
Re: Not a single-group function [message #272696 is a reply to message #272677] Sat, 06 October 2007 04:36 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Are you looking for something like this?
SELECT MAX(x.sum_weight) max_sum, x.sortnumber, x.beam_chit_no
FROM (SELECT SUM(a.weight_per_meter) sum_weight
             a.sortnumber,
             b.attribute1 beam_chit_no
      FROM sntx_sortmaster_warp a,
           apps.gme_material_details b
      WHERE a.weight_per_meter > 0
        AND a.sortnumber = b.attribute16
      GROUP BY a.sortnumber,, b.attribute1
     ) x
GROUP BY x.sortnumber, x.beam_chit_no;
Previous Topic: Using variables in a SQL Statement - SELECT ONLY
Next Topic: Help: Unable to create procedure
Goto Forum:
  


Current Time: Sun Dec 11 02:34:34 CST 2016

Total time taken to generate the page: 0.19471 seconds