Can be used with aggregate functions on large total rollup of the column

Hi all

I'm trying manipulate/aggregate on the grand total of the columns in the rollup package, can I do this? I use ROLL upward to avoid many groups nested clauses as below.

GROUP OF base.campaign, cij.avordertype, cij.invoiceaccount

)

)

Campaign of GROUP BY, invoiceaccount

) campaign group;

with

base_t as

(CHECK THE ICJ. AVBILLINGCAMPAIGN CAMPAIGN, ICJ. ORDERTYPE AVORDERTYPE,

NVL (SUM (CASE WHEN ICJ. (AVORDERTYPE = '01' THEN AVAMOUNT END CH.), 0) SUMAVAMOUNT_01,

SUM (CH. SUMAVAMOUNT_ALL AVAMOUNT),

CIJ.avordertype,

CIJ.invoiceaccount,

MIN (CIJ.invoiceid) firstinvoice_inrange,

COUNT (SEPARATE ICJ. REFFACTURE bills),

Sum (ch.avamount) invoicesamount

NVL (SUM (CASE

WHEN cij.avordertype = '01' CAN

COUNT (SEPARATE ICJ. REFFACTURE)

(END), 0)

OF CUSTINVOICEJOUR ICJ JOIN AVCOURIERHIST CH

ON substr (nls_lower (ICJ. DATAAREAID), 1, 7) = substr (nls_lower (CH. DATAAREAID), 1, 7)

AND SUBSTR (NLS_LOWER (ICJ. REFFACTURE), 1, 43) = SUBSTR (NLS_LOWER (CH. AVINVNUMBER), 1, 43)

WHERE substr (nls_lower (CH. DATAAREAID), 1, 7) = "201" AND SUBSTR (NLS_LOWER(CIJ.)) AVORDERTYPE), 1: 21) IN ('01 ', ' 09')

AND SUBSTR (NLS_LOWER (CH. AVCARGOCOMPANYID), 1: 25) = '06333675'

AND CH. AVINITIALDATE BETWEEN to_date ("'31.03.2014', ' dd.mm.yyyy") AND to_date ("'31.03.2014', ' dd.mm.yyyy")

GROUP BY ROLLUP (ICJ. AVBILLINGCAMPAIGN, ICJ. AVORDERTYPE, ICJ. INVOICEACCOUNT))

Select * from base_t;

Moreover, I can do anything with the help of ROLL UP clause instead of the bottom?

GROUP OF base.campaign, cij.avordertype, cij.invoiceaccount

)

)

Campaign of GROUP BY, invoiceaccount

) campaign group;

Concerning

Charlie

ROLLUP is used to obtain the aggregate more or less value. Here is an example

For the subtotal of wages to each level of deptno.

SQL > select deptno, empno, sum (sal)
2 of PEM
Group 3
4 by deptno, rollup (empno);

DEPTNO EMPNO SUM (SAL)
---------- ---------- ----------
10 7782 12450
10-7839-5000
10 17450
20 7369 12975
20 7566 12975
20 7788 13000
20 7876 11101


20 50051
30 7499 11600
30 7521 11250
30 7654 11250
30 7698 12850
30 7844 11500
30 58450

14 selected lines.

To get the subtotal of wages to each level of deptno and finally get a grand total

SQL > select deptno, empno, sum (sal)
2 of PEM
Group 3
4 by cumulative (deptno, empno);

DEPTNO EMPNO SUM (SAL)
---------- ---------- ----------
10 7782 12450
10-7839-5000
10 17450
20 7369 12975
20 7566 12975
20 7788 13000
20 7876 11101
20 50051
30 7499 11600
30 7521 11250
30 7654 11250
30 7698 12850
30 7844 11500
30 58450
125951

15 selected lines.

Tags: Database

Similar Questions

  • A key panel full size can be used with I pad pro?

    A key panel full size can be used with I pad pro?

    Only if the keyboard is full-size using Bluetooth connectivity.

    I've not seen any portable keyboards, full length using Bluetooth, however.

    Most Bluetooth keyboards for tablets are made compact to be more ergonomicaaly designed with the size of the tablet.

    If you found or will find a full-size, keyboard full length that works with Bluetooth for iDevices and iPads, so this should work.

    Good luck!

  • What is the first version of labview can be used with a USB-6001

    What is the first version of Labview, which can be used with a USB-6001?

    According to the user's Guide, you must DAQmx 9.9 or later version.  The oldest version of support DAQmx 9.9 is LabVIEW 2010 (DAQmx and LabVIEW version compatibility).

  • Can I use my modem wifi re-large up my internet 64-bit of Windows Vista

    ##wifi

    My laptop has a wireless modem, my access to the internet through the LAN. can I use my modem wifi re-large up my internet, so my other computers can us the internet.  I guess what im saying is my card wifi as a hub.   im sorry new to this.

    I use win vista 64-bit
    Thank you

    Hey, I can't install Win7 64 bit...

    Let's get back to a productive tone. You can use the Wi - Fi card on your laptop to create a wireless network for other computers. It is to create an 'ad hoc' network. While going through the installation wizard you can choose to make the ad hoc network, permanent or not.

    Note: You can always remove/delete a permanent ad hoc network at a later date. The permanent setting will allow the ad hoc network to stay open even if no other computers/devices are connected on it.

    To set up the ad hoc network, please follow the steps 1 to 3 as described here:
    Set up a computer-to-computer (ad hoc) network

    Once created the ad hoc network, you need to enable Internet connection sharing for the network. To enable Internet connection sharing, please read carefully the information / the steps here:
    Using ICS (Internet Connection Sharing)

    Note: In the long term, you will experience better performance/stability using a device dedicated to broadcast your network without wire (such as a wireless router). For any future reference the link below will allow you to check to see what hardware is compatible with Windows Vista, so that you can be sure that it will work properly with your computer:
    Windows Vista - wireless routers Compatibility Center

    Hope that helps.

  • can I use create valude function for MSSql scalar and table.

    Hello

    (1) can I use create scalar function for MSSql and function table?
    (2) is there how many type of function defined by the user in oracle 11 g express?
    (3) and I can reture 'type' any form user defined function?


    Attract sincerely

    944768 wrote:

    the answer lies in a few cases only,

    The response illustrates the basic concept of how customers need to use cursors created using PL/SQL as a layer of abstraction - SQL and this concepts adapts to ALL cases where the customer wants to Oracle via PL/SQL cursor.

    a case is,
    If my function returns only a single value, then I can use oracle 'create function' with the return type as types predefined as a whole, varchar2 etc?
    with regard to performance.

    With regard to this performance problem? And why now suddenly change the question to want to use a function to return data type number or string? How does this relate to PL/SQL to return a cursor now?

    A function can return scalar values, not scalar. A function may return atomic values (such as a unique number, or a non-scalar list of numbers). A function can return a complex data structure consisting of scalar values, not scalar.

    However, in PL/SQL function must NOT be used to read the lines of the database to cache lines in a memory of the server PL/SQL (PGA), then back to the client.

    He does not. It does not fit. It is too bloody dangerous to the overall health of the server as such code plays silly blighters with very expensive server memory.

    A PL/SQL function can also be used as guideline, returning data via expensive PGA, but via the SQL engine instead and using its slider interface (which allows output data to be "gradual" and not to return all data with a single copy of croustilleur mass of the call stack) directly. IT IS, HOWEVER, AN EXCEPTION. There is very rarely the need to make the functions PL/SQL pipeline table - and is often victims of abuse and bad demonstrated with examples of absurd code here.

  • I have a lg 4 k tv (40 "40UH630V TV LG ULTRA HD 4 K) with HDMI 2. 0 and if I buy apple tv 4 can be used with HDMI 2. 0 port or do I HDMI 3 port to use this? Please help me

    I have a lg 4 k tv (40 "40UH630V TV LG ULTRA HD 4 K) with HDMI 2. 0 and if I buy apple tv 4 can be used with HDMI 2. 0 port or do I HDMI 3 port to use this? Please help me

    You can use it with your TV.

  • What version of firefox can I use with windows me?

    What version of Firefox can I use with windows me? Where can I get?

    The last version that worked with Windows Me was Firefox 2.0.0.20, you can get it from ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.20/win32/pt-PT/

    It's the same language you are using, if you need a different language, go to the top-level directory, and then select the folder for the language of your choice.

  • Batterys that can be used with Qosmio F50?

    Batterys that can be used with the Qosmio F50 (exept oem 3640u-1brs)?

    Hello

    Accessories compatible with Options & are listed on the Toshiba support page.
    http://EU.computers.Toshiba-Europe.com/innovation/generic/PC-options-Accessories-EU/

    I think it's only relevant source where you can pick up information about all of the stuff available for your Qosmio F50.

  • Hi I have a new Apple Watch - sport Strip. Is it possible to buy separately strips that can be used with the watch?

    Hi I got a new Apple Watch as a gift at Christmas - sport band, white, 42 mm. 7000 series. Since this is my first Apple Watch, I wonder if I should check all options at the store before opening the box. Is it possible to buy separately strips that can be used with the watch?  Thank you, in advance, for any advice, guidance, you can offer the wisdom.

    Hi, Kate

    Yes - any band Apple Watch 42 mm fits your Apple Watch.

    Non-Sport bands have different lengths, then check the circumference of your wrist and see Apple Watch Sizing Guide (that compares all the Apple strips) before you buy separate bands:

    http://www.Apple.com/shop/watch/Sizing-Guide

    Try them in an Apple Store, it's also a great option.

    The Sport of Apple Watch also has an anodized aluminum housing, while the non-sport bands have different metals of cards and/or links (this does not affect the compatibility, only appearance).

    Information on how to pass the tapes: change your Apple Watch band - Apple Support

  • Messaging Instant Lync can be used with the Hosted Exchange mail server?

    Messaging Instant Lync can be used with the Hosted Exchange mail server? Let me rephrase the question. As everyone knows already Lync messenger is used with Office 365, but can be used with the same way hosted exchange server, it is used with Office 365?

    You will find support for MS Lync in these forums-online http://social.technet.microsoft.com/Forums/en-us/category/ocs

  • new camera Sx500 IS... Battery Pack NB - 4 L can be used with this device instead of NB - 6 L?

    new camera Sx500 IS... Battery Pack NB - 4 L can be used with this device instead of NB - 6 L?

    Hi Merrileeruth,

    Unfortunately, the PowerShot SX500 is not compatible with the Battery Pack NB - 4 L.

  • video cards can be used with a HP Pavilion HPE - 180 t office.

    Using a videocard ATI (AMD) radeon 4850.  It went wrong, and so I would like to know what other video cards can be used with a HP Pavilion HPE-180 t office.

    The Ribbon for the video card cable connector can be used with all video cards?

    Thank you

    Hi Mike,.

    I suggest you post the question on the link below. The link given below is supported for HP Forum link. As you use HP, they can help you better than us on the compatibility of the video card with their computer.

    http://h30434.www3.HP.com/T5/laptop-and-notebook-computers/CT-p/notebook

    Feel free to write us if you have any other issues related to Windows.

  • Photoshop elements 14 can be used with 10.11 El Capitan OSX operating system?  Thank you

    Photoshop elements 14 can be used with 10.11 El Capitan OSX operating system?  Thank you

    Hi Francisco,.

    Photoshop elements 14 can be used with OS 10.11

    Please let us know if you have any questions.

    Kind regards

    Abhishek Seth.

  • The pen Surface Pro can be used with a Dell computer, or does it take a specific Terminal?

    The pen Surface Pro can be used with a Dell computer, or does it take a specific Terminal?

    Hi Luzs,

    Could you please let me know if you want to use from the pen of Surface Pro with Adobe Applications for editing?

    Dell computer is also a touch screen computer you have?

    Kind regards

    Tanuj

  • Palm Treo 680 (T-Mobile) can be used with a Mercedes Benz GL-Class SUV with their Bluetooth connections?

    Hello.

    An old Palm Treo 680 (T-Mobile) can be used with a Mercedes Benz GL-Class SUV with their Bluetooth connections? http://www.Mercedes-Benz-mobile.com/ poster not only any how Palm Smartphones.

    Thank you in advance.

    Hello!

    Car kits Mercedes Benz uses are not on our list of compatible for the Treo 680.  You can go here for the list of products compatible bluetooth:

    http://KB.Palm.com/SRVS/cgi-bin/WEBCGI.exe/, /? St = 4236, E = 0000000000323018945, K = 1759, Sxi = 15, case = obj (41198) #headsets

    This could be because we did not try the phone on their cars or is not compatible.  What I would say, it's actually go to a Mercedes Benz dealer and try your phone on this SUV to see how it fairs.  These kits change annually, so it might work won't hurt there try before you buy

    Message edited by thetreoguy on 03/11/2009 14:21

Maybe you are looking for

  • The problem of the license

    I tried to simulate an example that I download sample. Example of name is Exposing_and_Tuning_HSPICE_netlist_model_parameters. But it gives me the warnings below.  The application is allowed for education. Measures15:59:32 - IV_Test_original measurem

  • Problem with Java app.

    I recently did an update to java, then I was unable to play games. I followed the instructions to uninstall and reinstall, I have now is more java in my control panel ICON, every time I try and stall, he comes back with an error 25099 message Impossi

  • Please I have android wintouch peripheral Q91,

    Please I have android wintouch Q91 device, It is not open because forget the password if you can help, thanks.

  • CUCM SIP road model Discussion

    Help-> to this page Model of IPv4 (Required) Enter the domain, subdomain, IPv4 address or the IP address of the subnet. For the use of model Domain Routing, entering a field of IPv4 model domain name that resolves to an IPv4 address. The domain name

  • Cisco's ASA 5510 VPN configuration suggestion

    Hello We have a cisco ASA5510 and our client has a device of Juniper. We already have a vpn tunnel between two locations and its working fine. Now they have networks that are in a safer area, if we add these subnets of the current tunnel we are not a