Skip to Content
author's profile photo Former Member
Former Member

Issue in SAP HANA

Hi Experts,

I am new SAP HANA.

Can any one of you help me on this issue?

Actually my input is:

Customer ID
Customer Name Amount Quantity 1000 C1 1000 12 1000 C1 2000 5 1000 C1 1500 9 1000 C1 1800 16 1001 C2 500 18 1000 C1 600 6 1000 C1 700 17 1001 C2 1860 5 1001 C2 500 3

I need the result in the below format

Customer ID Customer Name Amount Quantity

1000 C1 1000 12

2000 5

1500 9

1800 16

600 6

700 17


Sub Total: 7600 67


1001 C2 500 18

1860 5

500 3


Sub Total: 2860 26


Grand Total: 10460 93

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 10, 2014 at 01:03 AM

    Hi Hityshi,,

    The output which you are looking for is actually done in reporting tool like WebIntelligence (WebI).

    Regards

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 09:20 PM

    Hi Hityshi,

    Are you looking for an output like this:

    Please find the select statement i have used below:

    select DISTINCT "Customer ID" AS "Customer_ID","Customer Name" AS "Customer_Name", sum("Amount"), sum("Quantity")
        from krishna."Customer"
        group by grouping sets WITH TOTAL
        (
          ("Customer ID", "Customer Name","Amount","Quantity"),
          ("Customer ID", "Customer Name")
        )ORDER BY 1 NULLS LAST,2 NULLS LAST
    

    Regards,

    Krishna Tangudu


    Capture.JPG (51.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.