Results 1 to 3 of 3

Thread: SQL error of aggregation

  1. #1
    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.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    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?

  3. #3
    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;

Similar Threads

  1. Replies: 6
    Last Post: 12-11-2010, 11:37 PM
  2. Differentiation between Inheritance and Aggregation
    By Sonam Goenka in forum Software Development
    Replies: 5
    Last Post: 30-01-2010, 02:48 PM
  3. Link Aggregation - Bundling of interfaces
    By Willi in forum Networking & Security
    Replies: 4
    Last Post: 10-04-2009, 03:15 PM
  4. Server Error: 451, Socket Error: 10053, Error Number: 0x800CCC0F
    By Eigenberg in forum Windows XP Support
    Replies: 3
    Last Post: 03-06-2008, 04:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,178,170.40664 seconds with 17 queries