Problem with grouping and SUM
.Hello
Whenever you have a problem, post a small example of data (CREATE TABLE and INSERT, only relevant columns instructions) for all the tables involved and the results desired from these data.
Explain, using specific examples, how you get these results from these data.
Looks like you have a fan trap , where exist one-to-many relationships between tables, so that you are adding contains multiple copies of the same row of a table. If this is what is happening, then perform the GROUP BY and the AMOUNT on the table before joining. Without seeing some examples of data and the results desired from this data, I can't be sure if this is the problem, or any more tell you in detail how to fix it.
Tags: Database
Similar Questions
-
Printing problems with XP and Lexmark-documents are just stuck in the print queue
Original title: printing problems with XP and Lexmark
Until yesterday, I was able to print OK using Windows XP and a Lexmark Printer series 3500-4500 with wireless capabilities. Reported network test wireless (on printer) and report indicates that there are no reported problem, also did the diagnostic test and which shows no problem either. I can't print and documents are just stuck in the print queue - please can someone help, it drives me crazy because it's probably a very simple solution.
I guess you do not have all of the error messages.
It is possible that comes to mind that your printer has received a new IP address of your router (this could easily happen if you have several computers and other devices that connect to your wireless network).
Find the IP address of the printer of his network diagnostic page.
Click Start > printers and faxes, right-click the printer and select Properties
Select the Ports tab, then click on the button "Configure Port" (be careful NOT to click anywhere in the list of ports)
Make sure that the IP address in 'Port settings' is identical to that shown on the diagnosis of your network printer page.To avoid this problem in the future, you must configure the printer to have a static IP address. See your printer User Guide for instructions.
Choose an appropriate subnet address (i.e., has the first 3 groups of numbers the same as the other addresses in your network) but who is not in the range of addresses assigned by the DHCP server on your router. See the User Guide of your router for more details.
-
SQL grouping and summing impossible?
I want to create a sql query to summarize some data, but I'm starting to think that it is impossible with sql only. The data I have is of the following form:
The data are classified by TRAN_DT and by TRAN_RS. THA grouping and summing data based on tran_rs, but only when it changes. If in the table above, I don't want to see all the first 3 records but only one value DEBT the sum of these 3 i.e. 100 + 150 + 250 = 500. If the table above after grouping would be similar to that below:TRAN_DT TRAN_RS DEBT CRED 10-Jan 701 100 0 20-Jan 701 150 0 21-Jan 701 250 0 22-Jan 705 0 500 23-Jan 571 100 0 24-Jan 571 50 0 25-Jan 701 50 0 26-Jan 701 20 0 27-Jan 705 0 300
The TRAN_DT is the last value of the record sum. I undestand that the tran_dt are not selectable. What I've tried so far is the following query:TRAN_DT TRAN_RS DEBT CRED 21-Jan 701 500 0 22-Jan 705 0 500 24-Jan 571 150 0 26-Jan 701 70 0 27-Jan 705 0 300
Is it still possible with only sql, any thoughts?select tran_dt, tran_rs, sum(debt)over(partition by tran_rs order by tran_dt rows unbounded preceding), sum(cred)over(partition by tran_rs order by tran_dt rows unbounded preceding) from that_table
The report that I am creating in BI Publisher.Maybe it is possible to group the data in the model and my question here?The Re: tutorial method Tabibitosan by Aketi Jyuuzou me would be very useful here:
with sample_data as (select to_date('10/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 100 debt, 0 cred from dual union all select to_date('20/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 150 debt, 0 cred from dual union all select to_date('21/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 250 debt, 0 cred from dual union all select to_date('22/01/2012', 'dd/mm/yyyy') tran_dt, 705 tran_rs, 0 debt, 500 cred from dual union all select to_date('23/01/2012', 'dd/mm/yyyy') tran_dt, 571 tran_rs, 100 debt, 0 cred from dual union all select to_date('24/01/2012', 'dd/mm/yyyy') tran_dt, 571 tran_rs, 50 debt, 0 cred from dual union all select to_date('25/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 50 debt, 0 cred from dual union all select to_date('26/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 20 debt, 0 cred from dual union all select to_date('27/01/2012', 'dd/mm/yyyy') tran_dt, 705 tran_rs, 0 debt, 300 cred from dual), tabibitosan as (select tran_dt, tran_rs, debt, cred, dense_rank() over (order by tran_dt, tran_rs, rownum) - dense_rank() over (partition by tran_rs order by tran_dt, rownum) grp from sample_data) select max(tran_dt), tran_rs, sum(debt) debt, sum(cred) cred from tabibitosan group by tran_rs, grp order by 1, 2; TRAN_DT TRAN_RS DEBT CRED ---------- ---------- ---------- ---------- 21/01/2012 701 500 0 22/01/2012 705 0 500 24/01/2012 571 150 0 26/01/2012 701 70 0 27/01/2012 705 0 300
ETA: I added the rownum in analytical functions to take account of the "encounters" where a tran_rs has multiple entries for the same tran_dt. If you have some other unique key to use (for example, the primary key of the table) then I would use instead.
Published by: Boneist on February 17, 2012 11:41
-
curious problem with extrusion and rotation
I found a curious problem with extrusion and turn into the CS6. It's not a bug, but it's a behavior that is less intuitive who is confused and sometimes painful. I think it is something that should go on the list of tasks for the devs. Someone else, right? Don't agree?
Example:
I started with a path arrow, to which I applied the effect "extrude". I then put an icon on top of the arrow and grouped in the icon and the arrow. Now, I use this icon arrow in several different parts of my design, in different orientations. I flip the arrow, the relative position of the icon and the arrow seems to pass. I believe that this is happening because when you rotate the arrow icon, Illustrator rotates both the icon and the arrow on the center of the underside of the arrow. This is because the upper side of the arrow is essentially fictitious, just an artifact of the effect of extrusion. So, even if the icon appears as if it is drawn on the upper side of the arrow, it behaves as if it is attached to the underside of the arrow. When you apply a transformation, this transformation impacts on the underside of the arrow, causing the top of offset from the icon.
The solution would be to add an extra box to the effect of extrusion, asking if you wanted to extrusion (the way things are currently done) upwards or downwards. If you can extrude downwards, then the upper side of the arrow would be the 'real' face, those affected by the changes. You can then put a picture on the top, the arrow and the image of the group, and when you apply a transformation, the icon would remain fixed relative to the top, which would be consistent with your intuitive expectations.
If anyone is curious to experiment with this particular example, I posted this file in Google Docs here:
https://docs.Google.com/file/d/0B0Hoxcl5zTEtTXo5QnNsMGwwOGc/edit?USP=sharing
It's about what you just mount the image with a transformative effect to match the extrusion.
So basically, you apply a 3-d rotation effect to your image to match the rotation of your arrow, then you apply a transformation movement in the vertical axis to match the height of your extrusion.
hope this helps
https://docs.Google.com/file/d/0B4ilRoSBagc3d2w2Ylc2cWxFVjA/edit
If you want to get real on this issue retro we only corresponding to the rotation of the arrow in the center of the extrusion, if we wanted to distort the image perfectly, the rotation should be slightly higher, but anyway, it is hardly noticeable.
-
Problems with export and import
I have a problem with export and import
Here's what I did...
Here is my log exportexp "'/ as sysdba'" PARFILE=parfile.txt PAFILE TABLES=user1.Table1 file=Table1_1006.dmp LOG=Table1_1006.log query="where to_char(processeddate,'YYYYMMDDHHMISS') between to_char(to_timestamp('1911-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),'YYYYMMDDHHMISS') and to_char(to_timestamp('2011-10-06 16:46:26','YYYY-MM-DD HH24:MI:SS'),'YYYYMMDDHHMISS')"
Then I started to importset and AL16UTF16 NCHAR character set About to export specified tables via Conventional Path ... Current user changed to user1 . . exporting table Table1 16019049 rows exported EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. Export terminated successfully with warnings.
but I have no lines of base2/database2/rdbm15> imp "'/ as sysdba'" file=Table1_1006.dmp fromuser=user1 touser=user1 tables=Table1 log=imp_Table1_1006.log Import: Release 10.2.0.5.0 - Production on Thu Oct 6 19:57:01 2011 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Export file created by EXPORT:V10.02.01 via conventional path import done in US7ASCII character set and AL16UTF16 NCHAR character set . importing user1's objects into user1 IMP-00015: following statement failed because the object already exists: "CREATE TABLE "Table1" ("APPROVALTRACEID" VARCHAR2(64), "REQUESTOR" "EID" VARCHAR2(9), "EID" VARCHAR2(9), "FIRSTNAME" VARCHAR2(32), "LASTNAME" V" "ARCHAR2(32), "MIDDLEINITIAL" VARCHAR2(8), "TIER" VARCHAR2(3), "JOBTITLE" VA" "RCHAR2(64), "JOBCODE" VARCHAR2(10), "EMPLOYEETYPE" VARCHAR2(2), "CONTRACTOR" "TYPE" VARCHAR2(2), "EMPLOYEESTATUS" VARCHAR2(2), "COSTCENTER" VARCHAR2(10)," " "COSTCENTERDESCRIPTION" VARCHAR2(50), "CONTRACTENDINGDATE" VARCHAR2(8), "A" "CCOUNTSTATUS" VARCHAR2(2), "LOGINID" VARCHAR2(70), "APPLICATIONGROUP" VARCH" "AR2(50), "APPLICATIONNAME" VARCHAR2(50), "APPLICATIONID" VARCHAR2(12), "LEV" "EL1" VARCHAR2(512), "LEVEL2" VARCHAR2(512), "LEVEL3" VARCHAR2(512), "LEVEL4" "" VARCHAR2(512), "LEVEL5" VARCHAR2(512), "PROFILECODE" VARCHAR2(50), "PROCE" "SSEDDATE" DATE, "APPROVERMANAGEREID" VARCHAR2(9), "APPROVERMANAGERDELEGATEE" "ID" VARCHAR2(9), "APPROVERT4MANAGEREEID" VARCHAR2(9), "APPROVERT4MANAGERDEL" "EGATEEID" VARCHAR2(9), "APPROVERAPPOWNEREID" VARCHAR2(9), "APPROVERAPPOWNER" "DELEGATEEID" VARCHAR2(9), "PERFORMEREID" VARCHAR2(9), "NATIONALID" VARCHAR2" "(30), "COUNTRYCODE" VARCHAR2(9), "PASSPORTID" VARCHAR2(20), "DATEOFBIRTH" V" "ARCHAR2(15), "CITYOFBIRTH" VARCHAR2(15), "VENDORNAME" VARCHAR2(50), "VENDOR" "MANAGERNAME" VARCHAR2(50), "VENDORMANAGERID" VARCHAR2(9), "VENDORADDRESS1" " "VARCHAR2(100), "VENDORADDRESS2" VARCHAR2(100), "VENDORSTATEPROVINCE" VARCHA" "R2(15), "VENDORCOUNTRYCODE" VARCHAR2(9), "VENDORZIPPOSTALCODE" VARCHAR2(9))" " PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 4076863488 " "NEXT 1048576 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) " " LOGGING NOCOMPRESS" Import terminated successfully with warnings.
[server1]database2 /database2/rdbm15> sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Thu Oct 6 19:59:17 2011 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select count(*) from user1.Table1; COUNT(*) ---------- 0 SQL> exit
Published by: user3636719 on October 6, 2011 17:23SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi PL/SQL Release 10.2.0.5.0 - Production CORE 10.2.0.5.0 Production TNS for HPUX: Version 10.2.0.5.0 - Production NLSRTL Version 10.2.0.5.0 - Production
could ignore = y, and then try again. It should work
Concerning
Julien -
Problem with IMovie and Quick time
Hey everybody,
I am faced with an unexpected problem with Quicktime and I Movie, and I was wondering if someone had already known that:
I want to create a film based on shots from my personal camera. I started to work with IMovie to create a sequence of opening and added his musical band. I exported the scenes in Quick Time format without any problem. However, when I merge the exported sequence of I film with shots of my video camera, the soundtrack is completely eliminated.
I checked on the Internet and saw that there might be a problem of "Codecs". To avoid this, I exported the sequence IMovie with Codecs of same as one of my video camera files.
Now, if I compare the files exported from I Movie and those of my video camera, they have identical characteristics. However, the soundtrack will always disappear when I merge them.
Could someone please help me solve this problem?
Thank you very much in advance.
Concerning
Could someone please help me solve this problem?
Not only based on what you already said.
I want to create a film based on shots from my personal camera. I started to work with IMovie to create a sequence of opening and added his musical band. I exported the scenes in Quick Time format without any problem. However, when I merge the exported sequence of I film with shots of my video camera, the soundtrack is completely eliminated.
How would you"merge" files? (I.e. a "QuickTime" format is any form of data compatible with the platform of supply and the specific structure of QT incorporated into real employment that is stored in a container of MOV file on any of up to 99 tracks possible). Also, what app do you use for reading the file 'merged '? (For example, some media players ignore secondary audio tracks as a result of some methods of 'fusion' of files so it is important to know how the files are "merged," whether or not the audio data are "scattered" several tracks, and/or if the Media Player supports playback of multiple, sequential audio popular.)
I checked on the Internet and saw that there might be a problem of "Codecs". To avoid this, I exported the sequence IMovie with Codecs of same as one of my video camera files.
The specific codecs and settings using the specific version of iMovie? (The current Mac OS X operating systems have two X QT and 'classic' Qt integrated structure so it is important to know what structure is used here and how).
Now, if I compare the files exported from I Movie and those of my video camera, they have identical characteristics. However, the soundtrack will always disappear when I merge them.
As a general rule, you should review the file "merged" to determine why it does not play back correctly rather than comparing the characteristics of the source being merged files. The main problem here seems to be in your project workflow. That is, you seem to be when you perform an operation in two steps rather than edit several iMove multimedia files and then export the combined results in a video the video and audio tracks have been flattened and exported in standard compression formats with unified settings, features and the.
-
problem with Safari and the opening of sites
problem with Safari and the opening of sites
Please describe the problem in more detail?
Try to reset the settings of Safari:
1. open Safari
2. click on the Safari menu at the top (to the right of the Apple logo)
3. Select the Preferences/Privacy tab
4. click on remove all data from the Web site
5. close Safari.
Remove cache Safari files:
1. click on finder
2. look for the menu GO to top
3. click on GO and hold down the option key. This will show a user library folder.
4. click library and find the Caches folder
5. in the folder caches com.apple.Safari Ouvrezledossier
6. move the Cache.db file Trash.
This should solve the problem. If it does not help, try to disable the Safari extensions
1. open Safari
2. click on the Safari menu at the top (to the right of the Apple logo)
3. Select Preferences
4. find the Extensions tab
5 disable all extensions of
6. relaunch Safari
-
I've read about problems with Illustrator and photoshop on EL Capitan, but these seem to be in October 2015. She improved at all? I need to upgrade that I am running an old OS v but I need to run CS5. Can not afford to go to CC. I have a Macbook Pro.
CS5 and 10.11 are not supported and will never be supported by Adobe or Apple.
However it works for some, more actually, but not all. There are sporadic problems with Illustrator, Photoshop seems to be the best. Do not expect an improvement and keep in mind that anyone from Adobe, Apple or anywhere else will fix it.
Do a clean install
Make sure you have the Apple Java
h ttps://support.Apple.com/kb/DL1572?locale=en_US
Make sure you have your serial number and if you are having problems with the serial number or the serialization however adobe of web server will not support your problem.
update the application via photoshop.
-
problem with java and pogo games
I use mozilla, and now with the problems with java and hackers cannot play my pogo, what can I do? I disabled my java I tried java 6 does not work or is not safe, what is a safe way to play games on pogo using java?
Pogo.com is determined as a website SAFE to use Java with Mozilla Firefox?
-
I'm having a lot of problems with firefox and cannot figure out how to get help. It all started when I updated to 13. I get all kinds of advertising popups, I can't play a game on FaceBook called Farm Town at all, and I get a popup of AVG on the cookies that I can't get rid of. These issues are causing me to use Chrome quite often, although I like Fox better. I've searched and searched how to get help and find nothing. How can I get personalized technical help? These problems will not occur in Chrome at all. Thank you.
Do a check with some malware malware, analysis of programs on the Windows computer.
You need to scan with all programs, because each program detects a different malicious program.
Make sure that you update each program to get the latest version of their databases before scanning.- http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
- http://www.superantispyware.com/ - SuperAntispyware
- http://www.microsoft.com/security/scanner/en-us/default.aspx - scan Microsoft Security
- http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
- http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
Alternatively, you can write a check for an infection rootkit TDSSKiller.
See also:
- "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
-
Problem with youtube and other video sites
I have a problem with youtube and other video sites:
Everything is up-to-date (flash, FF, my plug ins.) but I get crashes when loading the video. I can hear the sound but I see only the first frame of the video.
I've reinstalled flash/firefox or tried updating them again for about 4 times now and my cookies/cache has also been errased which i usually don't do. If i enter FF's safe mode it also freezes.
I hope someone can help, I looked for answers on google before and I tried everything I saw, but it did not help.
GRTS,
agrashI had the same problem, I uninstalled the plugin Flash player (Adobe Flash Player 11.0.1 152) and the problem is solved. I installed the plug-in again and the problem came back. So right now I have no flas Player liked-in, but I don't have too much problem. I hope that I will not find another problem, but it seems that everything is OK.
-
Hello world
I have a huge problem with my Pavilion. I used Windows 8.1 earlier, and I decided to upgrade to Windows 10. I did not like something (can't remember what) and decided to return to Windows 8.1. Almost a year passed, I am again on Windows 10. But if I SLEEP my computer:
- Screen goes black, everything seems normal.
- No matter how long wait, fan keeps spinning and power LED, LED Wi - Fi on.
- Keyboard input does not help. Does not meet what it is.
- The only thing left to do - stop hard.
And if I shut down the operating system:
- Windows normally stops, close all applications, screen goes black.
- Fan on, led on.
I did not notice these problems with restarting and the hibernation.
Two things I've done in this gap of the year:
- Replacement screen. An old broke. Thanks to my cat...
- Formatted the drive. I don't think it would do anything diffirent.
So, any help would be appreciated.
Thanks in advance,
Kebab
Hello
On some machines, the pilot for 11 series IMEI has been known to cause that kind of question of the judgment, so it may be worth trying an earlier version.
You can use the following method to install an earlier version of the driver IMEI.
Download driver IMEI on the link below and save it in your downloads folder.
http://ftp.HP.com/pub/SoftPaq/sp66001-66500/sp66228.exe
Disable your wireless card (should be f12 ).
Open your download folder and run the installer - it warns you that it is an earlier version, but simply continue.
When finished, restart the laptop.
If the computer shuts down correctly, turn on your wireless adapter and use the utility on the following link to prevent Windows 10 to update automatically the driver IMEI again.
https://support.Microsoft.com/en-GB/KB/3073930
Kind regards
DP - K
-
Compatibility problem with Vista and iTunes
I downloaded iTunes 9 on my Tobisha laptop Satellite last night and put about 2.5 GB of music on it. I didn't upload the music from the internet. I used MP3s, I had for a few years.
When I went to boot up the laptop this morning the loading process took some time, but it never loaded to the login screen. I just see the bottom of MicroSoft. Is there a compatibility problem with Vista and iTunes? Maybe I put too much music on my laptop?
Boot in safe mode and delete iTunes and all the music I downloaded would solve the problem? Or it is less simple than that?
Don't know where to direct this question if any help you could provide would be greatly appreciated.
Thank you.
Hello
iTunes is compatible with Vista and there should not be any problem.
Yesterday, I installed iTunes 9 on my U400 and everything happened correctly.
If your laptop can not boot Vista correctly, then you should try the repair feature.Turn on the computer and press F8. Now you will see the advanced boot menu.
Now, you have many choices.As a first step, you should try the option called: last good known Configuration (Advanced)
If this will not help and the Vista will not start then try the option called repair your computer. This option displays a list of system recovery tools, you can use to repair startup problems, run diagnostics, or restore your system.
If that does not help, then you will need to retrieve the unit using the Toshiba recovery disc or HARD drive recovery.
-
Pavilion 15 laptop: problems with stop and "standby" mode.
I upgraded from windows 8.1 for windows 64 bit home 10. I had problems with stop and goes into sleep mode and cannot be resolved, then I reinstalled windows 10. Everything worked fine for a few moments, and then the same problem reappeared. I can't stop or put my PC into sleep mode, unless I have first of all to make a restart. After a reboot, I am able to stop or go to sleep mode without problem. If I try to do either without a restart, the screen goes black and the indicator light remains lit. The only way I can get it to start then press on and hold the power button and force a shutdown down, then press the power button to restart the upward. I have another PC, a wafer think that Lenovox has been upgraded to windows Windows 7 10. This PC work fine with windows 10, no problem at all. It's just the HP Pavilion 15 who has these questions. It makes me crazy.
Look through the tool of troubleshooting possible solutions here:
-
Problems with word and PDF after computer crash. Error "user has access privileges."
Problems with word and PDF after crash
My computer crashed and I had to run the recovery disk, the repair option, so he could run again. It does not format my computer but I had to re - install several programs. I reinstalled my copy of office for example. I have an external hard drive where I put most of my files but since installing the recovery disc, it does not open some Word documents and gives a message error "user has not access privilege." It's the same thing with some pdf files. What can I do? Please help because I can't open some of my documents from the University.
Hello world
I would like to just say thank you for your help and the problem is now solved. In the end I paid someone to sort it out. He explained that it was something like permissions for some of my files were owned by my old operating system and after that my computer crashed and I had to put through the recovery disc these permissions have been lost. He told me that he had a program that looked for the old existing and re-installed.
Thank you.
Maybe you are looking for
-
What is the advantage of Apple Watch Nike + Apple Watch Sport? Vice versa?
I am looking to buy a 2 Apple Watch series and contemplating on whether to get Apple Watch regular Sport or a Apple Watch Nike +. What are the benefits of a Nike + Apple Watch Sport vs? What are the benefits of Apple Watch Sport vs a Nike +? The soft
-
HP Pavilion dv7: the spotlight keyboard disabled at startup audio mute
Good day to all, I reinstalled the software audio Beats & after installation that this light of the keyboard works however, after stopping then starting, this feature is lost? Why? How can I correct results? Thank you in advance for your help! Kathy
-
Hello I'm trying to establish a connection to a VFD (Variable frequency drive) for academic research, for testing purposes. My implementation consists of: ---> LabVIEW (Master) ---> ABB ACS880 VFD (slave) with adapter from Fieldbus FENA-01 ---> (ABB
-
Disconnect the user from the sql server Server 2008 SQL server client
Hello... Please can someone guide me on how to disconnect the server SQL server 2008 sql server user client if the client is more than 10 minutes of inactivity Thank you Salomé
-
original title: network problems I recently installed the Netgear Wg111v2 wireless adapter and a router netgear WPN824v3 wireless... All Indications, that it should work... Instead, I get a message... «the network is disconnected...» "I checked all t