Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 09-05-2009
Member
 
Join Date: Nov 2008
Posts: 1,259
SQL error of aggregation

I am having the following query:

Code:
  SELECT  
  DATA.Account_Number AS Account_Number, 
  DATA.Service AS Service 
  DATA.Area AS Area, 
  SUM (DATA.Quantity) AS Quantity, 
  SUM (DATA.Amount) AS Amount 
  FROM DATA
  GROUP BY DATA.Account_Number, DATA.Service, DATA.Area;
And then I get an error of aggregation. But how to achieve that?

My goal is to use the account numbers, service and same area and add the quantity and value of transactions, if I summarize.
Reply With Quote
  #2  
Old 09-05-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: SQL error of aggregation

Your request is correct.

Can we have the DBMS used, a description of the table, possibly an extract of the data it contains, and the error message returned by the DBMS?
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #3  
Old 09-05-2009
XSI XSI is offline
Member
 
Join Date: May 2008
Posts: 271
Re: SQL error of aggregation

It this possible:

Code:
  SELECT  
  DATA.Account_Number AS Account_Number, 
  DATA.Service AS Service 
  DATA.Area AS Area, 
  SUM (DATA.Quantity) AS Quantity, 
  SUM (DATA.Amount) AS Amount 
  FROM DATA
  GROUP BY 1, 2, 3;
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "SQL error of aggregation"
Thread Thread Starter Forum Replies Last Post
error “shmget (lowmem) error: Unknown error 999” on linux -Wamil- Operating Systems 6 12-11-2010 11:37 PM
Differentiation between Inheritance and Aggregation Sonam Goenka Software Development 5 30-01-2010 02:48 PM
Link Aggregation - Bundling of interfaces Willi Networking & Security 4 10-04-2009 03:15 PM
Server Error: 451, Socket Error: 10053, Error Number: 0x800CCC0F Eigenberg Windows XP Support 3 03-06-2008 04:13 PM


All times are GMT +5.5. The time now is 08:41 AM.