Please someone help me on the query.
I'm using oracle 11g. The column has many numbers. few are positive numbers, negative numbers are few, and few are zero.
the table structure is as this:
Col1 |
9 |
-5 |
3 |
60 |
10 |
-15 |
-45 |
0 |
87 |
Now, I have to count the number of positive, negative and all number the number zero of the column and display three columns like this:
Nega_value | Posi_value | Zero_value |
3 | 5 | 1 |
What would the query?
Select sum (case when col1< 0="" then="" 1="" end)="">
sum (case when col1 > 0 then 1 end) posi_value,.
sum (case when col1 = 0 then 1 end) zero_value
from your_table
John
Tags: Database
Similar Questions
-
Hi I need help putting this in my site, doe, anyone know how or the html/css code, I need to work. A website with background is http://dotto.be
Thank you
The site uses a term called Parallax scrolling.
That can be achieved in Muse without any third party code.
See video link below to get started:
Adobe Muse - motion scrolling effect - YouTube
It also seems to use the third party widget that you can buy on sites like:
Muse - Themes.com - Adobe Muse Templates | Blog and Widgets of Muse
-
I need to know how to bypass windows log on screen I bought a used laptop Windows xp professional, but can't go beyond same login tried admin feature, but this was changed also. Please someone help!
I need to know how to bypass windows log on screen I bought a used laptop Windows xp professional, but can't go beyond same login tried admin feature, but this was changed also. Please someone help!
Answer for buyers of used computers in stock: do a clean reinstall of Windows or recover the computer back to factory costs. See
How to use pre-seed service partition to recover your software
-
I want to cancel my subscription, but I can't seem to contact support. I need to do this before the end of the repayment period of 14 days. I tried to do this for 2 days know with no luck. Please someone help me as soon as possible. It's really as regards and very frustrating.
To the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...
Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache. If he continues to not try to use a different browser. -
I bought 13 items. I can't get my redemption code to work for my serial number.
No one is very useful with the cat from adobe... wasted over an hour of my time. Please someone help me
Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html
-
Hello! Can someone help me with the address of repair service for Palm TX?
Hello! Can someone help me with the address of repair service for Palm TX?
Good luck and please, let us know here how it works for you. We like to know current resources, which can help to solve the problems of people with these older devices.
-
my windows vista windows update automatic premium disappeared when I go into Control Panel and click on windows update, a window opens and he said: 'that the page failed to load"and I can't access windows update at all... every Tuesday when microsoft releases the windows Automatic Update icon appears in my start bar in the box programs running to the right , but when I click on it nothing happens and when I right click on nothing happens either... its windows as update has disappeared from my computer... automatic or other... I even tried to restore the window at an earlier date and it did not help... Please someone help for is no error message it just will not load...
Hello
References for Vista also works on Windows 7.
Updates page is closely related to IE - look for something blocking.
What antivirus/antispyware/security products do you have on the machine? Be one you ALREADY had on this
machine, including those you have uninstalled (they leave leftovers behind which can cause strange problems).IE - Tools - Internet Options - Advanced - tab click on restore, and then click Reset - apply / OK
IE - Tools - Internet Options - Security tab - click on reset all default areas - apply / OK
Close and restart IE
IE - tools - manage Addons (for sure disable SSV2 if it is there, it is no longer necessary but Java always install
"(and it causes problems - you never update Java to go back in and turn it off again)." Search for other possible problems.Windows Defender - tools - software explore - look for problems with programs that do not look right. Permit
are usually OK and "unauthorized" are not always bad. If in doubt about a program to ask about it here.Could be that a BHO - BHOremover - free - standalone program, needs no installation, download and run - not all
are bad, but some can cause your question (toolbars are BHO).
http://securityxploded.com/bhoremover.phpStartup programs
http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.htmlAlso get Malwarebytes - free - use as scanner only.
--------------------------------
Try these to erase corruption and missing/damaged file system repair or replacement.
Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup
Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN
sfc/scannow
How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
generates in Windows Vista cbs.log
http://support.Microsoft.com/kb/928228Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.
How to run the check disk at startup in Vista
http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.htmlI hope this helps.
Rob - bicycle - Mark Twain said it is good.
-
How can I get ahold of a LIVE person? I need HELP with my email account (* address email is removed from the privacy *) you can contact me to the * address email is removed from the privacy * or * remove * please someone HELP! Mike Golab
E-mail address is removed from the privacy *.
No, and that has nothing to do with this old thread. This is a scam that last for years. Microsoft never does unsolicited phone calls.Is calling, Microsoft, a scam?
http://answers.Microsoft.com/en-us/protect/wiki/protect_other-protect_scanning/is-that-call-from-Microsoft-a-scam/6718e389-8a00-4E4B-ACA1-d07298ea4c19
Scams by e-mail or web: how to protect yourself
http://www.Microsoft.com/security/online-privacy/phishing-scams.aspx
It's a real call from Microsoft?
http://www.ComputerActive.co.UK/CA/PC-help/2134917/genuine-Microsoft
Avoid scams to phone for tech support
http://www.Microsoft.com/en-GB/security/online-privacy/avoid-phone-scams.aspx
Do not fall for phony phone technical support
http://blogs.msdn.com/b/securitytipstalk/archive/2010/03/09/Don-t-fall-for-phony-phone-tech-support.aspx
Aggressive, persistent Windows tech support fraudsters continue to track consumers
http://www.Computerworld.com/s/article/9248122/Aggressive_persistent_Windows_tech_support_scammers_continue_to_stalk_consumers
What is a certified Microsoft [or] partner?
http://securitygarden.blogspot.com/2011/09/Microsoft-removes-Gold-Certified.html -
I can't make a connection wifi with my Nook Color camera using a Microsoft MN - 700 wireless router. Can someone help me with the settings that could take care of this problem? I have a Dell netbook and a laptop HP working with the router so I know it works. The Nook also works in a Barnes & Noble store it seems so that the works of Nook. I have a similar problem with a LG Vortex phone where I can't do the wi - fi connection.
Please post on the Support forums technical Nook for help because it is not a Windows 7 problem...
http://bookclubs.barnesandnoble.com/T5/nook-technical-support/BD-p/nooksupport
.. .also than that...
http://www.barnesandnoble.com/u/nook-support-connectivity/379002491/
Don't forget the network encryption type, IE. WPA2/WPA and key/password / password must match the wireless router/access point.
See also this about WPA2 on the MN-700...
-
Need help to understand the query result
Hi gurus
I was reading one of the question here in this forum and its link is below:
I had some confusion related to this code and don't understand the logic of the out put, see query below:
Query
with sub_services as
(
Select su_seq 12323, 'HLR1' so_id, 1 seq Union double all the
Select su_seq 12323, "HLR2' so_id, seq 2 Union double all the
Select su_seq 12323, "A09" so_id, seq 3 of all the double union
Select su_seq 12333, "MO1" so_id, seq 4 Union double all the
Select su_seq 12333, "MO2' so_id, seq 5 Union double all the
Select su_seq 12333, "A09" so_id, 6 seq in union double all the
Select su_seq 12333, 'M0CR' so_id, seq 7 Union double all the
Select su_seq 12999, "LOL1' so_id, seq 8 Union double all the
Select su_seq 12999, "LOL2' so_id, seq 9 double
)
Select *.
of sub_services b
where exists (select 1 from sub_services
where su_seq = b.su_seq
and so_id = 'A09.
)
order by 2;
The query result
12323 A09 3
12333 6 A09
12323 HLR1 1
12323 HLR2 2
12333 M0CR 7
12333 4 MO1
12333 5 MO2
According to my understanding, the above query should return records in red only because of her is below command
It exists (select 1 from sub_services
where su_seq = b.su_seq
and so_id = 'A09.
but don't know why he's back 7 files, can someone help me understand the result...
It is query is functionally identical to the PL/SQL block, but much more effective.
declare
number of l_res;
Start
for line (select *)
sub_services) loop
Start
Select 1 from l_res
of sub_services
where su_seq = row.su_seq and
so_id = "A09" and
rownum = 1;
Essentially every row in the outer query are tested against him exists query. Given the correlation between two requests is based only on su_seq each line with a su_seq value returned by him is returned in the output.
Another way to think he uses instead a join condition. This query is equivalent to the query to exist
Select the main
of main sub_services
Join select (separate su_seq
of sub_services
where so_id = "A09") cond
We main.su_seq = cond.su_seq;
John
-
Hello, I accidentally deteled photoshop app and I don't know how to get back into my computer. Please someone help me!
If you used the creative cloud, see these instructions:
FAQ: How to download and install the Adobe Creative Cloud Desktop App?
FAQ: How to download and install creative cloud applications?
If you used the Creative Suite, please download here"
Suites and programs CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 , CS4 Web Standard | CS3
-
can someone help me with the link to download hp2050 print drivers that are compatible with windows 8, my software CD is not compatible with windows 8, and I can't use the printer now.
Hello
The installation program "Full Feature" can be found on the following link.
Kind regards
DP - K
-
Clouds (can someone help me with the error code 214?)
can someone help me with the error code 214?
Hello
Reference:--
Error in downloading, installing or updating Adobe Creative Cloud applications
-
I am trying to transfer the license from a Dreamweaver CS3 Macintosh product. A transfer of license form signed by the person who gave it to me. Can someone help me complete the process as cat Adobe say they are unable to help? I was told that the forum is reviewed by a team of experts. Anyone here? Thank you
Did you follow your form as well? A form must be completed and signed by both parties and submitted to the Adobe support via a support ticket. Chat support can't help, but should you indicated in section with the instructions.
-
HI all I would like to ask if you help me, I want to draw paths, but when I use options to mark with a pen or brush settings I lose quality when I Zoom, can someone help me with the settings for the pen?
The work path is a vector and infinitely scalable, but when caress you, Photoshop sets the pixels on a layer following the path. These pixels are rasterized and based and cannot be resized without loss of quality. You have options. If you want to enlarge the raster layer, transform the work path and stroking again. Or work at a resolution higher, in the first place.
Either incidentally, you can't trace a path with the pen, because it's a vector tool, and caressing is a matrix function based.
Maybe you are looking for
-
Reinstall 10.7.5 to help performance
Late 2009 iMac 10.6.1 when new, now running 10.7.5 with 8 GB of memory and 2 TB of disk running My Mac worked slowly for a while. Check memory, CPU etc. in the activity monitor shows no reason for this. I want to reinstall the OS X 10.7.5 menu utilit
-
Firefox takes a long time to close
There is a delay of 10 seconds after I click the 'X' to close Firefox. Same result with the "Exit" on the menu drop-down selection. It close much faster using "Alt - F4" or shut down the computer. Would this have something to do with some add-ons to
-
I ordered a Sony Walkman NW-S205F music player recently. I have googled and looked in the manual of instructions, but I can't find a way to turn on the device. Help, please. I have pressed the display, play and even they button button held down for a
-
Pavilion Slimline s3400f: HP slimline s3400f desktop bluetooth
HP Pavilion Slimline s3400f desktop PC - this computer has Bluetooth devices listed on the control panel. I have a set of 2 wireless speakers UEBoom I want to use with the computer. I lit one of the speakers and proceeded to Bluetooth devices on th
-
What has changed in Windows 7 solitaire?
Solitaire in Windows 7 is different. In the previous OS (Vista) my win percentage was 20%. In win7 is 13% (same computer). In addition, I maybe paranoid, but it seems that very often on the basis of a choice of 2 options (2 Kings at the top battery a