Please help me on UNBOUNDED PRECEDING and CURRENT ROW

Helllo Experts,
Kindly help me on below query..
SELECT
   SUM(n) AS month_amount,
  SUM(SUM(n)) OVER
    (ORDER BY n ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    AS cumulative_amount
  FROM t1
  GROUP BY n
  ORDER BY n;Here i need explanation over(what it does) over() and (ORDER BY n ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)And if you have any Docs over ANALYTICAL functions please help with them.
Ur help ll be appreciated..
Thanks
Basav

http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/functions004.htm#SQLRF06174
Regards
Etbin

Similar Messages

  • ROWS BETWEEN 12 PRECEDING AND CURRENT ROW

    I have a report with the last 12 months and for each month, I have to show the sales sum of the last 12 months. For example, for 01/2001, I have to show the sales sum from 01/2000 to 12/2000.
    I have tried this:
    SUM(sales)
    OVER (PARTITION BY product, channel
    ORDER BY month ASC
    ROWS BETWEEN 12 PRECEDING AND CURRENT ROW)
    The problem is: this calculation only considers the data that are in the report.
    For example, if my report shows the data from jan/2001 to dec/2001, then for the first month the calculation result only returns the result of jan/2001, for feb/2001, the result is feb/2001 + jan/2001.
    How can I include the data of the last year in my calculation???

    Hi,
    I couldn't solve my problem using Discoverer Plus functions yet...
    I used this function to return the amount sold last year:
    SUM("Amount Sold SUM 1") OVER(PARTITION BY Products.Prod Name ORDER BY TO_DATE(Times."Calendar Year",'YYYY') RANGE BETWEEN INTERVAL '1' YEAR PRECEDING AND INTERVAL '1' YEAR PRECEDING )
    The result was: it worked perfectly well when I had no condition; so it showed three months (1998, 1999, 2000) and two data points (Amount Sold, Amount Sold Last Year). The "Amount Sold Last Year" was null for 1998, as there aren't data for 1997.
    Then I created a condition to filter the year (Times."Calendar Year" = 1999), because I must show only one year in my report. Then I got the "Amount Sold" with the correct result and the "Amount Sold Last Year" with null values. As I do have data for 1998, the result didn't return the result I expected.
    Am I doing something wrong??

  • Hi Guys,  I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out

    Hi Guys,
    I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out as this web-site has been payed for by my client.
    Alex

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • My microphone is not working on my IPAD 4... It's version is 7.0.4. Please help me coz i cant my sister in HK can't hear me on skype. It's our only way of keeping in touch. Im so helpless. Please help me. Thank u and God bless everyone.

    My microphone is not working on my IPAD 4... I can't figure out if the problem has something to do when i updated the version. It's version is 7.0.4. Please help me coz i cant my sister in HK can't hear me on skype. It's our only way of keeping in touch. Im so helpless. Please help me. Thank u and God bless everyone.

    Have you tried reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • Please help , I have iPhone 4S and have updated to iso6, don't know if that has anything to do with the problem but I can't set the year on date and time to the correct year, it automatically goes to 2578 ? Plz help

    Subject:
    Please help , I have iPhone 4S and have updated to iso6, don't know if that has anything to do with the problem but I can't set the year on date and time to the correct year, it automatically goes to 2578 ? Plz help

    Settings>General>International.
    Set the calendar to "Gregorian". You have it set to Buddhist.

  • I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    video
    What version of Premiere Elements do you have and on what computer operating system is it running?
    Please review the following workflow.
    ATR Premiere Elements Troubleshooting: PE11: Project Assets Organization for Scene and Highlight Grabs from Collection o…
    But please also determine if your project goal is supported by
    a. format of your source
    and
    b. computer resources
    More later based on details that you will post.
    ATR

  • I have updated my iPhone 4s to iOS7 but when i connect it to itunes on my PC it give me a msg to restore your iPhone in summary tab, Please help m using win 7 and updated itunes.

    I have updated my iPhone 4s to iOS7 but when i connect it to itunes on my PC it give me a msg to restore your iPhone in summary tab, Please help m using win 7 and updated itunes.

    What is showing on the screen of the iPhone?
    Does iTunes say the iPhone is in recovery mode?

  • I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    So just to be clear, when you say "just bought" how long ago was that? Is it on this new iPhone that you had pictures, texts, etc that you want? Were you backing up to iCloud or onto iTunes?
    This may not help for everything but if you go to iCloud.com and log in, are you able to find your pictures there?

  • Please help! - My computer crashed and I need help reinstalling my CS3 software

    Please help!  My computer crashed and now I am trying to reistall my CS3 software.  I'm receiving Unable to Install errors for all of the programs in the Suite except the Acrobat 8 Professional.  Can someone please help me?  I cannot afford to upgrade, but need this software to do freelance work.  I own the software and serial number but Adobe will not support me as it is an older version.

    I downloaded and ran the Creative Suite Cleaner Tool.  It showed no files to remove, but still said it was successful.  I then tried reinstalling the entire suite.  Acrobat 8 Professional was the only program that installed.  All other programs gave me a componant failed error.  Any other advice would be greatly appreciated?!
    Thanks

  • Blank screen in itunes store-please help im not very technical and when i click on my itunes app the screen is blank how can i fix this please?

    Blank screen in itunes store-please help im not very technical and when i click on my itunes app the screen is blank how can i fix this please?

    See if any of the following fix it.
    Try logging out of your account on your phone by tapping on your id in Settings > iTunes & App Store and tap 'Sign Out' on the popup and then log back in.
    If that doesn't fix it then try closing the iTunes store app via the phone's multitasking bar and see if it works properly when you open the app : double-click the home button to open the taskbar and then swipe or drag iTunes from there up and off the top of the screen to close it, and the click the home button to close the taskbar.
    A third thing to try is a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the equivalent of a reboot.

  • Please help! I have photoshop and iphoto does not show it in my preferences edit window. How do I get it as an option in my preferences.

    Please help! I have photoshop and iphoto does not show it in my preferences edit window. How do I get it as an option in my preferences.

    I tried it and nothing changed. Even when I right click on an indiviual image all it does is duplicate it. Iphoto seems to be recognizing my external hard drive as an editor......cannot get photoshop except to drag a picture into photoshop from iphoto, and once I have worked on it and saved it to iphoto I cant find it anywhere.

  • Hello sir i have IPhone 5 this imei is : ******** and i but my mail and password but the icloud tell me its wrong please help me my mail is : ********  and my password is ********

    hello sir i have IPhone 5 this imei is : ********** and i but my mail and password but the icloud tell me its wrong please help me my mail is : *********
    and my password is *******
    <Personal Information Edited by Host>

    You might try the following steps:
    Restart the device by holding down the on/off button until the power down slider appears.
    Try entering your password in another location (i.e. when you are using a different wifi network)
    Reset all settings (settings > general > reset), this resets some of your settings to factory default. It’s not a complete removal of settings. It removes all of your preferences for Wi-Fi, Bluetooth, Do No Disturb, Notifications, General, Sounds, Brightness & Wallpaper and Privacy. It does not remove any of your data.
    Try signing out of iCloud and back in (only if find my phone is disabled)
    If this doesn’t help your best option may be to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.

  • Hi Rstor work for the iPhone 5 remains 4 hours Standby Please please help as soon as possible and thank you

    Hi Rstor work for the iPhone 5 remains 4 hours Standby Please please help as soon as possible and thank you

    These are user-to-user forums, you are not talking to Apple here - I've asked the hosts to remove your phone number from your post.
    You can contact iTunes support via email via this page and ask them why the message is appearing : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • My ipod keeps asking me to restore and when i do restore it just restarts and asks me to connect to itunes and starts again.please help its my sons bday and this is his present

    my ipod keeps asking me to restore and when i do restore it just restarts and asks me to connect to itunes and starts again.please help its my sons bday and this is his present

    Maybe:
    Restore loop (being prompted to restore again after a restore successfully completes)
    Troubleshoot your USB connection. If the issue persists, out-of-date or incorrectly configured third-party security software may be causing this issue. Please follow Troubleshooting security software issues. .
    Next try placing in DFU mode and then restoring.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    Then try restoring on another computer.
    Last, make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Update Failed for Sum of previous row and current row

    Hi i need to update the column length of the previous row and current row so i followed this method but i'm unable to update what is problem in my syntax
    SQL> begin
    2 DECLARE Total number = 0;
    3 UPDATE StringOutput set Total = SumOfLength = Total + ColLength;
    4 end;
    5 /
    DECLARE Total number = 0;
    ERROR at line 2:
    ORA-06550: line 2, column 22:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    := . ( @ % ; not null range default character
    if i update without the variable total then my command is succeeded
    UPDATE StringOutput set SumOfLength = ColLength;
    but i need the previous row+current row count in SumOfLength
    Thanks!

    Getting this error now
    SQL> begin
    2 DECLARE Total number := 0;
    3 UPDATE StringOutput set Total = SumOfLength = Total + ColLength;
    4 end;
    5 /
    UPDATE StringOutput set Total = SumOfLength = Total + ColLength;
    ERROR at line 3:
    ORA-06550: line 3, column 1:
    PLS-00103: Encountered the symbol "UPDATE" when expecting one of the following:
    begin function pragma procedure subtype type <an identifier>
    <a double-quoted delimited-identifier> current cursor delete
    exists prior
    The symbol "begin" was substituted for "UPDATE" to continue.
    ORA-06550: line 3, column 46:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    . ( , * @ % & - + ; / at mod remainder rem return returning
    <an exponent (**)> where || multiset
    The symbol ". was inserted before "=" to continue.
    ORA-06550: line 4, column 4:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
    following:
    ( begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted

Maybe you are looking for

  • How can I attach the input file in eCATT in ECC6

    Hi, I have created one script using SECATT for transaction F-28. For testing I have created on Test Configuration using this test script and on variant tab I used the external variant and gave the file name. But I am getting the error "Variant that m

  • Album Artwork Issue

    Just got the Beatles box set, everything's tagged correctly (obviously, it's from the iTunes Store itself), and yet, some of the albums in the set won't load their artwork. At random, some have the artwork, some don't. To reiterate, I've double-check

  • Photoshop wont install Unable to create symlink at ....

    So I just bought the creative cloud license and was trying to install photoshop but every time I try I get this error message This is what it says: Exit Code: 7 Please see specific errors below for troubleshooting. For example, ERROR: DF014 ... -----

  • Edit the Master-Page from all blogs in mysite

    I am currently setting up mysite. I was able to configure the mysite-masterpage for all profiles, but I can't seem to change the masterpage for the blog! What is the best way to change the masterpage from all blogs?

  • Can't download some additional content

    For some reason i can't download 3 of the additional content. Piano stereo drum kit rock stereo drumt kit alternative has anyone experienced that? regards Petter