Problem with the application of additional row of total and the sum of the records

Hello gurus,

drop table T;
create table T (name, symbol, amount) in select
Select 'Cindy', 'AA', double union all 1050000
'Michael', 'ML', DOUBLE union all select 150000
Select 'Bill', 'BL', double union all 1050000
Select 'Nancy', 'NY', 4000 DUAL Union all
'Cindy', 'AA', 3000 Union select double all
'Michael', 'ML', DOUBLE union all select 1050000
Select 'Bill', 'BL', DOUBLE union all 1200000
Select 'Cindy', 'AA', DOUBLE union all 1200000
"Vish", 'VH', 1200000 from DUAL;

I want to have a result set from each name, symbol and flat and an additional line "Total" at the buttom that the sum of all.

SELECT NAME, NVL(SYMBOL,'TOTAL') sym
Of
(BY SELECTING NAME, SYMBOL, SUM (AMOUNT) IN T GROUP BY NAME, SYMBOL, SUM)
GROUP BY grouping sets ((NAME, sym), NAME)

But it does not work... . When I'm wrong...: (kindly help and thanks in advance)

Like this

select name, symbol, sum(amount)
  from t
 group by rollup(name, symbol)
having (grouping_id(name) = 0 and  grouping_id(symbol) = 0)
    or (grouping_id(name) = 1 and  grouping_id(symbol) = 1)

or

select name, symbol, sum(amount)
  from t
 group by grouping sets((name, symbol),()) 

Published by: Karthick_Arp on June 29, 2012 03:27

Tags: Database

Similar Questions

  • Cannot use Skype download message problem with the recording device.

    Original title: Windows Livecam

    Hi my Skype can't my webcam micro and constantly sentds me a message saying "problem with recording device" How can I solve this problem?

    He also says that my audio device is disabled in windows. I don't know what to do if someone could help that would be great :)

    I had this problem too. This isn't a matter of Skype but there is a problem with the Audio driver on your system.

    I used the following steps to detect the problem:

    (a) I uninstalled the existing version of Skype

    (b) installed the new version of Skype

    (c) check if the problem still persists. Given that the problem still persisted.

    (d) consulted the sound link in the Panel control, updated sound card driver software.

    Problem solved.

  • Having a problem with the recorder of flight on a remote server

    This is the right forum to ask this question? When I try to start a recording, I get a pop up message, "a unaticipated java.lang.RuntimeException has occurred." Details below. The remote app is on a linux server running a java application with build 1.7.40. Also, I started it with the JVM arguments:-XX: + UnlockCommercialFeatures - XX: + FlightRecorder. As a btw, I am able to use control of the Mission on the remote server. In addition, flight recorder works on my local JVM.

    java.lang.RuntimeException

    at com.jrockit.mc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refresh(FlightRecorderProvider.java:107)

    to com.jrockit.mc.browser.views.JVMBrowserView$ 1.run(JVMBrowserView.java:99)

    to java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:471)

    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)

    to java.util.concurrent.ScheduledThreadPoolExecutor$ ScheduledFutureTask.access$ 301 (ScheduledThreadPoolExecutor.java:178)

    to java.util.concurrent.ScheduledThreadPoolExecutor$ ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:293)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:744)

    Caused by: com.jrockit.mc.rjmx.services.ServiceNotAvailableException

    at com.jrockit.mc.rjmx.internal.DefaultConnectionHandle.getServiceOrThrow(DefaultConnectionHandle.java:350)

    at com.jrockit.mc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refreshRecordings(FlightRecorderProvider.java:119)

    at com.jrockit.mc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refresh(FlightRecorderProvider.java:98)

    ... 8 more

    If you run your jvm with jmx authentication is enabled, you can see the solution in this thread:

    Connection to remote JVM error

  • problem with the recorder on my clip

    I recently had problems with my clip. It was freezing, slow (20 seconds for any action), and stoped working in total recorder. because of these problems, I reformatted it and solved all the problems. the only problem I have is that after reformatting, the recordings began to make a constant hum in the background, and I was wondering if there is any way to fix it.

    and a two second recording takes up double the memory of what a record of one hour ahead

    Download the firmware and reinstall it in the drive.

  • Problem with the records to display in the advanced table of the popup window OPS

    Dear all,

    I have a requirement as below.

    I have a contextual search page I displays the data sought in the advanced table, but the question is of all the rows displayed in the window pop up due to the size of the window dolls, even I'm not able to view the button 'Next' in the table to proceed following files, can anyone suggest me how to display the button 'NEXT' in the table , so i can display all the records in the table.

    or is it possible to implement "SCROLLBAR" in table advanced in the pop up window so that I can scroll vertically and horizontally to display the records.

    Thank you

    My question solved thanks

  • Skype Call Failed: The problem with the recording device.

    Well, whenever I try Skype call my friends, or even the test thing, he always falls the appeal and there is a yellow popup at the top that says: "Proem with recording device"... Including"
    [17: 07:01] * call to Echo / Sound Test Service, no response. ***" .

    I have no idea what is wrong, I've updated two times this week, a subject 2 days ago, anoter only a few minutes ago... >
    Help, please...

    How I fixed it, was that my microphone was not completely connected. Make sure any mic you use for Skype is completely plugged

  • Reflect the problem with the recording of the license of Visual C++ 2010 Express

    Original title: Visual C++ 2010 Express license

    Hello - I have been using Visual C++ 2010 Express and it is registered under my OLD email, is it possible that I could he license as part of my new Email?

    Hi Morse,

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums.

    MSDN Forum (Visual C++ Express Edition)

    http://social.msdn.Microsoft.com/forums/en/Vsexpressvc/threads

    Hope this information helps.

  • Problem with the disk free space.

    I use the power of fire 7100 (the 5.3.0.3 Version of FireSight 5.4.1.7 sensor Version). I have political problems that apply to the device. And is unable to update sensor for the newest version. Cisco support community help me! Thank you! They and I think that this problem can be in the use of the disk.

    What I oh sensor:

    Size of filesystem used Avail use % mounted on
    / dev/sda5 2.9 G 562 M 2.2 G 21%.
    / dev/sda1 99M 37 M 58M 39% / Boot
    / dev/sda7 67 67 G 0 100% but
    No 1.9 G 136 K 1.9 G 1% / dev/shm

    May be the problem with the records of Volume.What I could check and delete? Thank you!

    Hello team,

    * Could you please check the following points: -.

    CD/var/tmp /.

    du-sh *.

    You can clear the/var/tmp/en using the following. Files under/var/tmp temporary files are. :-

    rm - rf *.

    It is a known bug where the but gets completely due to Apply_ files *.

    * Also check the following points: -.

    CD/var/sf/updates

    Remove the old patches if there are.

    * Check the following backup folder and the folder of detection engine too.

    CD/var/sf/upgrade_backup

    du-sh *.

    CD/var/sf/detection_engines

    du-sh *.

    Rate if this helps you.

    Concerning

    Jetsy

  • Creative sync cloud app. problem with the web application

    Hello

    I have some problems with the synchronization of files in the creative Cloud Files folder on my computer (I use a Mac) and the Creative Cloud Web App. practically the files I have on my computer folder do not appear on the web (and I can't create links of sharing for them) and vice versa. We have a team account and we can exchange files between us, but nothing appears on the web application. The problem applies to all members of the team.

    There is a problem with the service or it could be a local problem?

    Thank you

    Florin

    @ursuss - what you see in the creative Cloud Files folder on your computer must match what you see on the site Active CC to https://assets.adobe.com/files.

    Use the collector for the Adobe Log tool to https://helpx.adobe.com/creative-cloud/kb/cc-log-collector.html and newspapers as well as the explanation of the problem by e-mail at [email protected]. Please provide additional information indicated by Warner Harress in this Adobe forum post https://forums.adobe.com/message/8385752#8385752.

  • iOS 10 problems with the Mail application

    Dear Apple and community support,

    Here's my problem:

    I have upgraded to iOS 10 on my iPhone 5s this afternoon (September 13), and now I'm not able to open e-mail - Yahoo!, and Gmail. I can receive emails, I'm not able to view the body of these emails. When I press on them, all I see is a blank white page. I can't answer emails either. I can only their flag or remove them. However, I am able to compose new e-mail messages.

    Here are the steps that I've taken to try to solve my problem:

    1. Restarted my phone
    2. Remove and re-add my Mail accounts
    3. Made a backup and a restore full while that plugged into my laptop with the latest version of iTunes.

    I should be grateful if you would help or more information on this issue.

    Thank you

    Emily

    I also have problems with the Mail application.  On my iphone, ipad, and Mac Pro.  I have several addresses, a MSN, another on Go Daddy and Gmail.  I have various weird problems with threads and every day he re-charge my emails, like if I have never read before.  Something is really problematic with Mail.

    Can the people of APPLE, you help me?

  • my iPhone 6s has problems with the GPS when I use some applications, it does not work well and give especially the bad road. Can someone help me?

    my iPhone 6s has problems with the GPS when I use some applications, it does not work well and give especially the bad road. Can someone help me?

    My iphone 6 has started having the same problem. Its literally the GPS. Saying that it does not find me at all. Ive seen say location for more than an hour in the suburbs of chicago. It started to happen to me after I downloaded the latest update for the iphone. I hope they react and let you know what is happening because I'm dying to know as well.

  • Problem with the numbers in the rows of cut and paste

    Hey,.

    I'm new to MAC and now have problems with the help of figures, I brought my windows Excel worksheets. On windows, I could cut a line and paste anywhere on this page and by practice that Excel would fill the void rank where I cut the content. but here on MAC it does not work, why?

    anyway I tried to live with it by cutting a line and for the collage, I used Insert > copied lines for paste swath and add a line for her. but last night I updated the numbers and now by the practice precedes the Windrow is stuck this time with a resized form, the line is resized to a big line.

    Why is this happening? If it can't be fixed, I can go back to a previous version of a number? This update of hate.

    Numbers is excellent NO then you should consider to guide your expectations.

    Cut number refers only to the content NOT the line, or cells.  Select when a row, and then use the cut command that you cut the contents of the cells.

    If you try to move a line from one place to another, you should try this method (which can work for you)...

    Select the line, then click and hold on the header line (up to the line "lift" on the table), the operation slide the line to the destination.

    Now drag the line:

    Now drop the line where you want to:

  • No problem with the addition of a Kingston SSDNow V300 240 GB SDD to a D7-1245dx?

    A knowledge of any problems with the addition of a Kingston SSDNow V300 240 GB SDD to a D7-1245dx? Its size is 7mm width 69,85 mm x depth 100mm height but not sure of the size of the computer laptop berries/caddy supports

    Decide whether to use the laptop for a little longer so to upgrade the system to a Kingston 240 GB SDD drive and move the current drive to the secondary location (already got 2nd coming of caddy). It lets me do a bit more space on the laptop in addition to increasing performance.  Figure between an SSD and get up to 8 GB ram it should last a little longer.

    You will have a shopping cart for the SSD, but it looks like you have an and get a second wagon. Dv7-1000 series does not use a cable or connector. the hard disk plug right into SATA ports on the motherboard. 7mm drive has the connectors SATA and the mounting holes exactly in the same place as a 9.5 mm drive. All is just shorter so the reader rides low in the caddy. As a swimming pool with 20% water let out. 7mm SSD works perfectly. Windows 7 or 8/8.1 are preferred; Vista is not configured to treat SSDS as well or easily.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • 7 error "Paris 7.2.241.1enRegInstaller.exe of work and has been closed." A problem with the application to stop functioning properly. Windows will notify you if a solution is available.

    Original title - 7.2.241.1enRegInstaller.exe

    Hello.

    Today, JUST after I "Set Windows to update," twice, I got the disconcerting message:

    "Paris 7.2.241.1enRegInstaller.exe of working and was closed".

    A problem with the application to stop functioning properly.  Windows will notify you if a solution is available. »

    Any wisdom or experience with this?  I'm on a 64-bit HP Pavilion older (dv7-1245dx) with this OS JUST-update Windows (Vista Home Premium).

    Thank you.

    GIES W

    The solution has been found just uninstall bing bar, restart the computer, and if you want just bing toolbar to reinstall. This easy solution my system fixed.  Bing has again reminded all my points that I have amassed

  • Problem with the screen size of my application in the emulator for BlackBerry 10

    Hello, I have a problem with the emulator for BlackBerry 10 and is as follows:

    When I run my application in the emulator waving, sounds good and all content is complete, however, when I run the application in the emulator for BlackBerry 10 soft looks as if she had a zoom very large level of predefined way and only see a part of the application.

    With controller emulator, I have changed the level of 70% zoom, but still does not work.

    Here, I'm posting two photos:

    One future half-assed answer

    var dpr = 1; // To set the meta on a real device to get 1:1 pixels
    
    if(typeof window.devicePixelRatio != 'undefined') // Does device support devicePixelRatio?
        {
        dpr = window.devicePixelRatio;
        }
    
    if(dpr) // Set up the right meta
        {
        var meta = document.createElement("meta");    meta.setAttribute('name','viewport');
    
        meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no');
        document.getElementsByTagName('head')[0].appendChild(meta); // Inject meta
        }
    

    This works perfectly, but must be placed in thethe document FIRST and foremost

    Live JS is used to avoid problems of library management

    It won't work in Wellington but works perfectly on all devices I've tried

    As mentioned in the code above just packaging needs in the script tags and setting very high index.html HTML code as you can get - right afteris my favorite before any CSS or JS place<p class="reply"> <p class="reply">There are extensions to this topic-injection of script, I like to keep my code clean</p>

Maybe you are looking for