With separate issue and SUM

Hi I have worked on this for too long hours.

Separate doesn't seem to work, and I tried many combinations of SUM that I'm starting to lose hope.

I have a very large select. It gives me the results I want. Here's a script that will create values you as I get select statement.
INSERTION of REM in EXPORT_TABLE
TOGETHER TO DEFINE
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '010427102', 1439, 289);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '010427102', 1439, 289);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '010432334', 1750, 292);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '010432334', 1750, 292);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '010445831', 1439, 1);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '010445831', 1439, 1);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '010958361', 1439, 288);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '010958361', 1439, 288);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '010958411', 1439, 290);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '010958411', 1439, 290);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '010973899', 1940, 294);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '010973899', 1940, 294);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '010985638', 1750, 293);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '010985638', 1750, 293);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '011027893', 1750, 291);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2011-2012', '011027893', 1750, 291);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ('2010-2011', '666666666', 6666, 1);
Insert into EXPORT_TABLE (YEAR_DESC, CONTRACT_NUMBER_TEXT, RC, CLI_SERVED) values ("2011-2012", "666666666', 6666, 1");

Now what I want to do is simple, but I can't understand it. Basically, I want to SUM (CLI_SERVED) for EACH YEAR_DESC. I don't care CONTRACT_NUMBER_TEXT or RC. I want just the sum of cli_served for each year_desc.

I tried many combinations, none work. What intrigues me the most is that I put a different one on year_desc but it returns me always the same years. What am I doing worng?

I add the following select statement for the table above, but it does not work
Select sum (cli_served) rc, separate (year_desc), CONTRACT_NUMBER_TEXT,
OF got_r_num
WHERE r_num = 1 - and agreement_type_ind = 4
Year_desc, CONTRACT_NUMBER_TEXT, rc GROUP
order of contract_number_text, year_desc

Bascially this does nothing but send back me the same data as above. If I only group IN YEAR_DESC, which seems logical for me it give me a '00979. 00000 - "not a GROUP BY expression" error


Thank you

Basically, I want to SUM (CLI_SERVED) for EACH YEAR_DESC. I don't care CONTRACT_NUMBER_TEXT or RC.

Then why are you their inclusion into the Group?

Just do:

SQL> SELECT year_desc
  2       , sum(cli_served)
  3  FROM export_table
  4  GROUP BY year_desc
  5  ORDER BY year_desc
  6  ;

YEAR_DESC                      SUM(CLI_SERVED)
------------------------------ ---------------
2010 - 2011                               2039
2011 - 2012                               2039
 

Tags: Database

Similar Questions

  • My wife and I use an address e-mail, but with separate wallpaper and parameters of separate accounts. How do I do this in W8?

    I just bought two new Dell computers, which are set up side by side on a LAN, one for me and one for my wife.  When configuring the computer of my wife, she is not able to create a new user account because mine has already used the same email. I woke up, the menu wallpaper tiles and start my computer appeared on my wife until I started to put in place, and the changes made on his computer appeared on mine.

    I want to be able to create two accounts separate, each able to read email family, but with different images of wallpaper and screen settings, arrangements of different start menu and names of different accounts and passwords that are independent.  In fact, I want several user accounts on each computer in the privacy for files between users.  I had it on XP.  How he do on W8?

    Thank you for your attention.

    If you want to change your current account at the local level and then put your mouse in the top right Conner and go on settings and click on it need to change PC settings "found inside" click on it then go to users in the left menu and click on that and then pressing the switch to a local account This can be found under the user name

    Sean

    hope that this help please reply if you need more help then please answer if it worked for you answer please

    Thank you

  • Newsstand App with monthly issue and simple edition

    We have an application multi-probleme with iTunes subscriptions (retail) in kiosks. We currently publish monthly issues within our application.

    Recently, we also published a special issue in using this application to several subscription questions so that existing subscribers would see this special issue in detail Viewer. What we like.

    Now, we would like to publish this special issue as a simple editing application so that the new and future users "see" it inside the App Store.

    Can users download these two identical applications, which means that they can buy this twice? Is there a way to prevent this 'double purchase"DPS or App Builder or through iTunes Connect?

    Tom

    If I understand correctly, each application is relatively independent law. In other words, does not allow a purchase in one application to determine the right inside the other. Still, we're talking about two different types of purchase iTunes:-app against app.

  • 5520 Photosmart, Laserjet 252dw: copy with separate scanner and printer

    I have a Photosmart all-in-one Scanner/printer and a new printer Laserjet. I am very satisfied (also pictured) quality of the laser printer, but I didn't buy an all-in-one again. So my question is, if it is somehow possible to copy of the Photosmart directly to the Laserjet Printer?

    Thanks in advance

    Hi @egau,

    Welcome to the HP Support forum.

    I understand that you have a HP Photosmart e-all-in-one 5520, printer and a printer HP Color LaserJet Pro M252 and want to send copies of the 5520 directly to the Laserjet Printer. I would like to help with that.

    There is no way to copy directly from the 5520 to the Laserjet Printer because they have no way to communicate with each other. What you need to do is scan the 5520 to your computer, and then send the scanned file to print the Laserjet Printer.

    Please let me know if that solves the problem, or if you need assistance.

    In fact, if it helps you to find a solution, please click on the 'accept as Solution' and the 'thumbs up' buttons down below in this message.

    Thank you!

  • I have updated to IOS 9.3.3 this morning. Since then my battery runs out very quickly and it loads very slowly. I read a post with similar issues and it was immediately rejected. I am convinced that this question took place directly after the update.

    I feel battery drain extremely fast and slow to load since the update to IOS 9.3.3. Any advice?

    Try the procedure described in this article to see if they help, especially to check background App update. Make sure it is OFF. Also, look under the battery as described in the article.

    http://www.Apple.com/batteries/maximizing-performance/

  • Table with the Kindle and generated content in e - pubs design problems

    I encountered a strange problem with e-pub files exported from 5.5 design. It's only a problem with the Kindle, but that in itself is a pretty big problem. This has to do with the way In Design creates tables of contents. As you know, the "Table of contents" function in In Design is what generates the NCX or navigation device in your e-pub. Our books, we also create a linked table of contents in the text of the book. Below is a string of code generated by In Design that shows a typical chapter opening header that is included in the NCX and also back to the table of contents links in the text. The first (toc_marker-10) id is automatically generated by the 'Table of contents' function and corresponds to the id used by the NCX. The second id (Morella) has been created by me using an anchor point and assigning a "destination of the hyperlink" which can bind an element in my table in the text of the content. Then this piece of text is a hypertext link (via as HREF) return to the table of contents page. As you can see, In Design puts the second id towards the end of the code and after the HREF that links to my table of contents page. This works very well on all the reading devices except the Kindle, which seems to become confused by the order of the elements in the code. Amazon said that because this second id comes after the HREF, the hyperlink does not appear on this text (Morella) and the connection breaks. The way around this is simple: just move the second id < an id = "Morella" / > while it comes immediately before the href tag and everything works. But that means getting into the e-pub afterwards and put away all instances of the problem. In addition, there is no consistency in order that design attributes to the elements in the present code. In some cases where the links have been created in exactly the same way, the second id appears before the HREF and the link works fine. It's just a bug or did someone knows if In Design actually uses logic to decide the order of the items below?

    < h4 id = "toc_marker-10" class = "chapternumber" > < a href = "Poe_Short_Stories - 2.html #CONTENTS" > < an id = "Morella" / > Morella < /a > < / h4 >

    It really doesn't seem like a problem of Kindle. InDesign creates an EPUB file, not a Mobi file. It is designed to create an EPUB that will pass validation.

    Creating the EPUB MOBI file is a separate issue and not something that InDesign must concern itself with.

    At this stage of development of eBook (early on), it is quite well provided you will need script or manually change some CSS and XHTML to adjust the vagaries of different devices.

  • What should I do if I share an Apple ID with someone else and want to separate?

    What should I do if I share an Apple ID with someone else and want to separate?

    Back in the day, I couldn't create one identifier Apple I was in high school and did not have a credit card so I used Apple ID my father

    Best way is to get up an ID new Apple because using the same Apple ID will share your information with another person with the same account

  • With Microsoft Vista and McAfee Internet connection issues

    Hi I would appreciate any help with this issue.  I'm not a very experienced user.  I'm having all kinds of problems with McAfee Security 9.0.  He stops working and says I have no internet connection and that you can not update. I contacted McAfee and they came on my computer, uninstalled and reinstalled and I'm still having the same problem.  Them, that I came across an article from McAfee dealing with this problem and Windows Vista.  I have the 64 bit version.  The solution is 1. Click on the Windows button and type cmd.

    2. right click on cmd and run as administrator

    3. at the prompt, type the following command, and then press ENTER:

    netsh int tcp set global autotunninglevel = off

    It then gives you instructions to reactivate the auto-tuning network if this does not resolve the problem.

    I would like to know if anyone has tried this and the results, also if this works this deactivation causes me to have other problems with my computer.

    This may seem very simple for some people, but because I'm not known I want to create more problems than I have now.  Through this site, I learned how to remove McAfee from my computer, and it would be the last thing I would do if nothing works.

    Thank you... Victoria

    Hello

    It's as good as anything else, it's free and designed to work properly with Windows OS'.

    http://www.Microsoft.com/security/PC-security/MSE.aspx

  • I try to install the McGraw Hill software and get an access denied error message. I have contacted the software company, they tell me it's a compatibility issue with Windows Vista and to contact Microsoft.

    I try to install the McGraw Hill software and get an access denied error message.  I have contacted the software company, they tell me it's a compatibility issue with Windows Vista and to contact Microsoft.

    Right-click on the setup.exe > run as admin.

    See you soon. Mick Murphy - Microsoft partner

  • A bit of an issue with Microsoft & AVG and Isearch & Myclean PC

    A bit of a problem with Microsoft & AVG and Isearch & Myclean pc, after installation of AVG, I find that they elect themselves install Isearch & possibly other programs without permission and are now charging money to remove the said nuisance with MY own PC.  It's MY computer, not theirs.  I don't think that Microsoft should be in the browser hijacking business or cooperate with those who are.

    Hi Carl,

    AVG and Isearch is not a Microsoft product, this problem occurs if you install AVG, you may need to select another installation option bar tools and modules.

    See the following for more information Microsoft article.

    http://forums.Avg.com/in-en/AVG-forums?sec=thread&Act=show&ID=185183

    More information or update, I recommend you contact the AVG support.

    http://forums.Avg.com/in-en/AVG-forums

    I suggest you to check if there is no toolbar or associated with Isearch & Myclean modules are installed on your computer.

    Manage Add-ons in Internet Explorer: http://windows.microsoft.com/en-in/internet-explorer/manage-add-ons#ie=ie-9

    I suggest a full system virus scan and check if it helps.

    Microsoft Safety Scanner: http://www.microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again. The data files that are infected can be cleaned by removing the file completely, which means that there is a risk of data loss.

    Keep us updated on the status of the issue.

  • Are there still known issues with Lightoom 5 and El Capitan with respect to attachment? I know that problems have been resolved with CC Lightoom

    Are there still known issues with Lightoom 5 and El capitan with respect to attachment? I know that problems have been resolved with Lightoom CC.  I looked on the Internet but most of the references are Lightoom CC.  Ive got all the updates with Lightoom 5, (Camera RAW 8.1), but also Apple, (El Capitan 10.11.3), but my Nikon D800 will not always tie.

    HAL P Anderson wrote:

    The problem is in the SDK (SDK) of Nikon. He used features of OS that changed with El Cap. All previous versions of LR were broken by the Exchange operating system. For LR 5 to work, it must be associated with the new SDK of Nikon, and Adobe is not reissue of older versions.

    The result is: LR5 and previous versions will continue to not be able to attach Nikon under El Capitan. I'm sorry.

    HAL

    Although what you say is maybe true, I'm not sure, but there were reports of people that says exactly the opposite. Home of Nikon has not worked in 2015/6 but continued to work in LR 5 on the same Mac running 10.11.x.

  • I can install Illustrator CC with Photoshop CS6 and Indesign CS5.5 or can I have some compatibility issues? I use Windows 7. Thank you...

    I can install Illustrator CC with Photoshop CS6 and Indesign CS5.5 or can I have some compatibility issues? I use Windows 7. Thank you...

    Generally, it should work, but of course there may be problems of occasional compatibility through different programs and their different versions.

    Mylenium

  • How to save a calendar I created with the photo and the dates recorded on separate pages?

    How to save a calendar I created in photoshop with the photo and the dates recorded in the form of two separate pages?  When I save in pdf or jpeg, they are automatically save 1 pg with dates and photos on a single page.  This is causing problems when I print.

    Hi there, in which case your printer is not very large, you can also trim down the two versions and print them as separate documents.

    (1) create a guide where you want to split the pages by clicking on the rule (hit control R if they are not displayed) and dragging to the desired location.

    Create the Guide to make it so be precise in the way which divide you your page, and so that no part of the image will be repeated or lost.

    (2) select the Cropping tool and adjust the area of culture at half top of your agenda, using the guide you have just made to align with the right place. Press return to complete the harvest.

    (3) go in file > save as the. Name the file something like calendar_top and select the desired file format. Press "Save".

    (4) once you return to your calendar file, go to the history Panel and select 'Guide to flirting This will bring you to step before you cropped the image.

    (5) repeat the steps as before to the bottom half of the schedule, once more, using the guide to help you make your growing area.

    Then you would just print each of the two pages individually. The images does not appear in a single document, but if you have Acrobat you could combine the files.

    I hope this helps!

  • RAM with SP issue 4270 and KVR133x64sc3l/256

    I have a problem with MS 4270 and KVR133x64sc3l/256.
    Memory is known by the BIOS but Windows 98 does ' t start

    Hello

    Obviously the RAM module is some worries. I found this module compatible info for your unit is:
    64 MB PA3004U
    128 MB PA3005U
    PA3006U 256 MB
    To use this unit must be RAM of PC100 SDRAM SODIMM 144 pin module. Please check on the net if you can find a module with these reference numbers. They must be good because they are tested and recommended by Toshiba.

    Good luck!

  • cDAQ-9174 with modules 9225 and 9239 for issue of power measurements...

    Hello to one and all.

    I do turn a cDAQ-9174 with modules 9225 and 9239 to measure the voltage (120, 208-240, 277 VAC) and current (via the clamp amp i400, Fluke - 10mA/exit A) respectively.

    I have the set scale scale Differential No. (1:1 I guess) for 100: 1 for current and voltage.  With the acquisition mode set to "N samples", 10 samples to read, at the rate of 500 m.  This feeds into 'EPM_Power.vi' (polymorphic VI of the palette of EMP... can be downloaded here, http://sine.ni.com/nips/cds/view/p/lang/en/nid/209826)

    I try to check my numbers with an Analyzer of power quality of 435 Fluke and supporting that upward is a Fluke 179 True RMS DMM with clamp amp i200 (for current playback)

    Now, I'm running is my numbers I take data look like they're following a curve of fishing... the averages are on the right, but when my blood pressure is expected to be relatively stable, it's over the map... same story with my current readings.  I tried several different filters without success.  I would like to have relatively stable values for voltage and current so my other values are correct.  Is there a signal conditioner or filter that will help with this?

    As always, a point in the right direction would be greatly appreciated!

    Thank you!

    Chad

    Hi, Will,

    Your request for a screenshot actuall lead me to the solution.  Not enough samples!  I took little data too slowly and only seeing part of the wave of fishing AC each iteration.  .. that became glaring when I tried to this graph.  So I increased my sampling of 100 to 5 Hz and things seem to have settled things down a bit.  Thank you for the good question!

    SH?

    C

Maybe you are looking for

  • The title bar does not appear, it is not a menu option view

    I remember I once a title bar above the horizontal list of tabs, which shows the title of the currently opened tab. But it is not there now; and there is no option in the menu 'View' (which is, I think that I've seen it before) to add. What happens,

  • How can I save my favorites

    I have several bookmarks how I save them on a flash drive or a floppy disk?

  • Apple and Magic mouse/Touchpad keyboard does not not in CT

    I have an end 2013 27 "iMac connected to a MacMini via TB.  When I get the TOC, I can see the desktop of the Mini, but my keyboard and mouse/trackpad unresponsive.  I have not tried to connect a knockout and a separate mouse to the mini to see if the

  • Is this OK to clone brand new machines to save time?

    I bought 4 new HP Probook laptops. Each has its own Win7 and Win8 installation media. I didn't have to use the restore canned image, so I installed Win7, installed the drivers, ran Windows Update and installed other programs required on laptops. It t

  • WAG320n - can he endure RFC1483 bridged?

    Hi all! I have a bit of difficulty to the top of my new WAG320n brilliant as a replacement for my planned ISP modem/router. I'm with Bethere, providing ADSL2 + by using encapsulation, type "RFC 1483 Bridged", but I can't seem to select this mode in t