State and County of Group by

Hello

Is it possible to group by condition based on the request satisfied? I have a table with the column 'value', and I would point out, how much exceed a certain value and how is smaller than this value.

Example table:

Param_name Param_value

ABC1 31

ABC1 29

CBD xyz

ABC1 35

ABC1 40

I want that the output voltage:

Values > 30 3 =

The values < 30 1

Is it possible to generate this report?

Hello

First of all, you need to determine if param_value contains a number.  How do depends on what kinds of channels you want to interpret as numbers.  If you want to only consider whole unisgned, then you can do something like this:

WITH got_grp AS

(

SELECT THE CHECK BOX

WHEN param_value IS NULL THEN NULL

WHEN LTRIM (param_value

"0123456789"

) IS NOT NULL NULL THEN

WHEN TO_NUMBER (param_value) > = 30

THEN ' values > = 30'

ELSE ' values<>

END AS grp

Of ample_table

)

SELECT grp

AS cnt ACCOUNT (*)

OF got_grp

WHERE PRV IS NOT NULL

GROUP BY grp

;

I hope that answers your question.

If this isn't the case, please post CREATE TABLE and INSERT statements for your sample data.

Report where the query above is erroneous results and explain, using specific examples, how to get good results in these places.

Always say what version of Oracle you are using (for example, 11.2.0.2.0).

See the FAQ forum: Re: 2. How can I ask a question on the forums?

This looks a lot like a drawing or model entity-atteribute-value table, which is useful if you want applications complex, inefficient and error-prone, but not good for many other things.

Tags: Database

Similar Questions

  • Disc circumvented State and SAA 'no '.

    We use MD3220 das, configured and managed using MDSM Powervault.  The physical disks to slot 8,9,10 and disk 11forms Group 3 in a RAID 10 configuration. Recently in slot 10 the failed physical drive and at the same time disc 11 became "bypassed". Global hot spare to crack 20 is now used which did not spare the disc around to 11 (as seen in the recovery guru). Disk group status is "degraded". Physical disk 10 ASA is 'Yes' and 11 is 'no '. At this point, we have replaced the disc at 10 and it became possible after some time and disk group status became also optimal, but bypassed disk (11) remained in this State. Now 10 is a pair in global mirror with 20 (relief) and 20 is always showing of saving to disk at 11. Is it safe to replace 11 (bypassed disk)? The Service action (abduction) allowed 11 disk State is always 'No' which is confusing.  Help, please. Fixing a few screenshots that might help.

    Hello rejishkr,

    You can replace the disc in the slot 11 as since it is bypassed it was taken offline.  When you replace the disc if you still get the error bypassed then we will need to get a bundle of your MD support so that we can look at the errors & see what is causing the reader to be bypassed.

    Please let us know if you have any other questions.

  • I do my job to the computer on a MAC computer. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open t

    I do my job to the computer on a MAC book PRO. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open the document. My problem is the document does not show the icon, but rather the document is already open. I spoke with 2 Apple. 'Experts' care and can help me. Can someone tell me what to do?

    It's a question of how the recipients e-mail programs deal with attachments. Many e-mail programs will open all the files they can handle, including files jpg and PDF, by default, and if the recipient has not changed that there is nothing you can do about it. The only solution is to the compress first, then it will be delivered as an attachment, allowing the recipient to decompress and open it.

  • I live in the United States and would like to buy a song from the Germany. Is this Possible?

    I live in the United States and would like to buy a song from the Germany. Is this possible?

    Hello

    You can buy songs that are available on iTunes Store for your country.

  • How unclose window and all its groups of tabs?

    I have at least 100 tablets in groups of 5 or more and then had another window open with nothing important in. The main window has been closed to restart Windows, and then the window with nothing in it was closed. When I start Firefox, it opens the window unimportant, and the tab group page is empty. How to get back my tabs and groups?

    Oh duh. I got it. Under the history he has "Recently closed tabs" and also "recently closed Windows".

  • Tecra M4 Tablet is underspecced compared to the United States and France

    I want to buy a Tecra M4 tablet. The main reasons are: optical drive, with a resolution SXGA + and a good graphics chip.

    Toshiba saw fit to make us pay more than the United States and France for a laptop with only 1.73 Ghz, 60 GB hard drive, Combo DVD/CD-RW a skinny nVidia 6200 with 64 MB of ram.

    In the United States they may have 2.13 Ghz, tickets (+ R double layer), hard drive 80 GB and nVidia 6600 GPU with 128 MB of ram. All for less than what we are paying for our pathetic version.

    Because they do not give us a DVD burner, those who need to make restore disks will have 6-7 CD - R. Who can be bothered and dealing with that many discs.

    Toshiba you have really disappointed me. Re-enter your.

    I agree but I still love my M4.

  • I have several purchases through the iTunes Store on my bank statement and I don't know what they are for. Can you help me? Cannot maneuver through this system to see the purchase history.

    I have several iTunes Store purchases that appear on my bank statement and I don't know what they are for. Can you help me? I'm unable to maneuver through this system to view previous purchases.  I wonder if I pay for extra storage, it is always advising me that I'm pretty sure.

    Hello

    Open iTunes on your Mac and click your name (if you are not signed in, then sign to see your name). Then click on account information. Once you enter the account information screen, you will see a section called historical of purchases. Click 'View all' to see the list of purchases and the ability to watch the dates more.

    See you soon,.

    GB

  • What are the differences between the services and site domain group policy and group policy?

    What are the differences between the services and site domain group policy and group policy?

    Server must wonder about the Technet site.  http://social.technet.Microsoft.com/forums/en-us/home

  • I don't remember the password for my network, but I do remember the password for my computer and my home group.

    I don't remember the password for my network, I remember the password to my computer and my home group, they are all different to change that, but family crisis distract me unable to use my ipad now or my other computer help!

    original title: password

    Hello

    What operating system is installed on the computer?

    Perform the steps mentioned below, if you have Windows 7 installed on the computer and see if the problem persists.

    a: right click on the wireless in your taskbar icon.

    b: open network and sharing Center and then click manage wireless networks on the left.

    c: you will see all the networks you have connected too.

    d: right click on any connection to Properties.

    e: click on the Security tab that shows the details of the security of the network including the password. Click on the box to Show characters.

    Hope this information helps.

  • Action, State and events, CTF files

    Hello

    In my project, I received a labview program that has a main VI and about 100 SubVIs.  Some of the subVIs are named: Action, States and events. And a Subvi is written for each user action. Actions, States, and the screws of events are CTL files.

    Is - any technique of special programming used in labview for any specific purpose? I am a novice in labview.

    Thank you

    Josée Vilas V

    Vilas,

    The .ctl files are custom controls.  Without seeing them, I can't be sure, but I suppose they could be witnesses typedef'ed enumerated (enum).  These are often used for engines of the action and state machines.

    The state machine is a widely used program architecture. There are examples in the design templates that ship with LabVIEW.

    If you have had no training in LabVIEW, the online tutorial are a good starting point.  It would be very interesting to spend a few hours before your dive in your project.

    Lynn

  • Home page by default for OBIEE 11 g based on the users and the wise group

    Hi all

    I'm using OBIEE 11 g.

    I need set the page default dashboard for the user and the wise group.

    EX:

    User1 is belongs to Group1 and Role1 - they need to see the default homepage as Dashboard1.

    User2 is belongs to the Group 2 and Role2 - they need to see the default homepage as Dashboard2.

    Kindly guide me to achieve.

    Please answer as soon as POSSIBLE.

    Thanks in advance.

    RR

    It is generally considered poor form to scream as soon as POSSIBLE to a question. http://www.CatB.org/ESR/FAQs/smart-questions.html

    As far as your question goes, it is that the CHEMINPORTAIL variable is for:

    http://docs.Oracle.com/CD/E23943_01/bi.1111/e10540/variables.htm#i1013436

    OBIEE - system (reserved variables) session variables | GerardNico.com (BI, OBIEE, data warehouse and OWB)

  • Interrupted SQL statement and start several times with several SQL_EXEC_ID

    Hi all

    We meet a strange phenomenon, maybe someone can help.

    We see that sometimes, when our client runs a single statement, implemented Oracle to process the statement with a special SQL_EXEC_ID, but after a while stops and starts processing the statement along with different SQL_EXEC_ID. Then, after a while, it happens again - stop Oracle processes the statement and start from the beginning with the new SQL_EXEC_ID. This happens again and again until we kill all of the other sessions on the database (then it ends).

    What we see exactly: Client executes the statement (sql_id = "2tp7pz6yv87qp"). Monitor us v $ SQL_MONITOR and get this:

    SELECT Sql_id, sql_exec_id, to_char (SQL_EXEC_START, "HH24:MI:SS MON-DD-YYYY) SQL_EXEC_START, status OF V$ SQL_MONITOR where sql_id = '2tp7pz6yv87qp' ORDER BY SQL_EXEC_START DESC;

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 the EXECUTION

    After a while check us again and see this:

    2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 the EXECUTION

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

    After a while, we see this:

    2tp7pz6yv87qp 16777219 28 may 2015 08:09:58 the EXECUTION

    2tp7pz6yv87qp 16777218 28 may 2015 07:53:37 FACT

    2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 FACT

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

    and so on — will happen again and again until we kill all of the other sessions in the database.

    When comparing the follow-up of the different SQL_EXEC_IDs SQL reports, we see that each of them did exactly the same job: used the same execution plan, beginning treatment she even read/wrote the same amount of e/s and each of them stopped at the same point during execution. You can see that for each SQL_EXEC_ID execution 'stops' in the middle and never reach the end of the plan. She always stops in the JOIN by HASH and never continue to the next steps in the implementation plan.

    When you look more deeply, we see in V$ ACTIVE_SESSION_HISTORY always last thing that happens for every SQL_EXEC_ID is HASH JOIN RIGHT OUTER (SQL_PLAN_OPERATION = HASH and SQL_PLAN_OPTIONS = RIGHT OUTER JOIN). Then comes the new SQL_EXEC_ID and it starts to do the same thing as the previous SQL_EXEC_ID did when it was launched.

    Kill all other sessions, run finally ends. We see that the final (successful) SQL_EXEC_ID work and completes his plan to run to completion.

    When executing the same single statement (when it comes to the single session in the database), it ends with a single SQL_EXEC_ID. Its SQL monitoring report looks like the final execution when the phenomenon occurs after killing all other sessions.

    -We checked that the customer executing the query only once. AWR also only shows simple execution of the query.

    -We have reproduced in many different clients (plus SQL, JDBC thin client OIC and DBMS_SCHEDULER job).

    -It has no PARALLEL in the query or table.

    -In this case for different statements (different INSERT-SELECT and MERGE instructions).

    -Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Does anyone have an idea?

    Finally found the root cause of the problem.

    This phenomenon occurs when the cursor of the active query being invalidated. This can occur in several scenarios, in our case, what happens when we work on a single partition (read or write) and perform DDL operations on different partitions of the same or the tables.

    Steps to reproduce:

    1 launch long command DML that affect the single partition

    2. in the course of executing this SQL, do one of the following values in a session different all 1 minute:

    2.1 do the indexes to a different partition unusable: ALTER TABLE X EDIT PARTITION Y UNUSABLE LOCAL INDEX

    2.2 rebuild the unusable index of different partition: ALTER TABLE X EDIT PARTITION Y REBUILD UNUSABLE LOCAL INDEX

    2.3 a partition different truncate

    Support of Oracle we were told that this problem is known and there are several requests for bugs and improvements thereon, for example this one:

    Bug 12905327 : TRUNCATE to an INVALID PARTITION TABLE UNNECESSARILY IMMEDIATELY all THE SLIDERS

    In our case (ETL process), we used to perform all these operations DDL and DML operations long (we work on different partitions in parallel). In order to solve, we have separated these operations to the different phases in our process and don't be DDL and DML operations at the same time more. This solved the problem for us.

  • Invalid Application State and functionality appeared not

    Hi all

    I created a Helloworld Android application like Oracle JDeveloper 12 c (12.1.3) tutorials - Setting Up Mobile Application Framework . When I deploy the device app, I can get into the application, but the html page cannot be shown, the newspaper indicates oracle State and functionality of application not valid. Success has not been created. What's the matter with him. Can someone help me? Thank you very much. Here is the part of the newspaper.

    07-16 05:14:09.251: D/dalvikvm (2005): lib shared add /data/app-lib/com.company.MyAndroidMobileApp-1/libvmchannel.so 0xb302f490

    07-16 05:14:09.251: D/dalvikvm (2005): JNI_OnLoad No. found in /data/app-lib/com.company.MyAndroidMobileApp-1/libvmchannel.so 0xb302f490, skipping init

    07-16 05:14:09.251: D/dalvikvm (2005): attempt to load /data/app-lib/com.company.MyAndroidMobileApp-1/libvmchannel_dalvik.so lib 0xb302f490

    07-16 05:14:09.251: D/dalvikvm (2005): lib shared add /data/app-lib/com.company.MyAndroidMobileApp-1/libvmchannel_dalvik.so 0xb302f490

    07-16 05:14:09.251: D/dalvikvm (2005): JNI_OnLoad No. found in /data/app-lib/com.company.MyAndroidMobileApp-1/libvmchannel_dalvik.so 0xb302f490, skipping init

    07-16 05:14:10.091: D/dalvikvm (2005): GC_FOR_ALLOC released 353 K, 6% free 7864/8288 k, break 3ms, 4ms total

    07-16 05:14:10.121: W/ContextImpl (2005): has failed to ensure that the directory: /storage/sdcard/Android/data/com.company.MyAndroidMobileApp/cache

    07-16 05:14:10.271: D/GVC (2005): [SEVERE - oracle.adfmf.framework - EmbeddedFeatureInformation - Builder] invalid application state

    07-16 05:14:10.271: D/GVC (2005): oracle function [SEVERE - oracle.adfmf.framework - EmbeddedApplicationInformation - getAllFeatures]. Success has not been created.

    07-16 05:14:10.361: I/CordovaLog (2005): evolution of the log to DEBUG level (3)

    07-16 05:14:10.361: I/CordovaLog (2005): found preference for useBrowserHistory = true

    07-16 05:14:10.361: D/CordovaLog (2005): found preference for useBrowserHistory = true

    07-16 05:14:10.361: I/CordovaLog (2005): found preference for output-on-suspend = false

    07-16 05:14:10.361: D/CordovaLog (2005): found preference for output-on-suspend = false

    Best regards

    Sheng

    Thank you very much for all. I solved this problem. The reason is that the frame of the mobile application don't either not be applied successfully. How to check if the hotfix is applied successfully, you can view this title:Re: MAF: cannot install Mobile Application Framework JDeveloper Patch, so you need to reapply the patch. If you don't apply the patch once again successfully, I think that you must reinstall JDeveloper in administrator mode.

    Best regards

    Sheng

  • ESXi host goes to the State and the virtual machine does not restart on other host does not

    Hi all

    I'm looking for a solution, in which case the host goes to the State and the virtual machine on it does not restart on a different host (they'll just gray) does not not what could be the problem here and how to fix it

    later when the failed host returns upward machines either go to motor off the coast of the State, or they show that under tension

    While the host is down or not responding do not I am able to ping the host ESXi (5.5) and able to ping the default gateway and the DNS servers of the host itself

    Yes AF, the answer to all these questions is Yes, it is a HA and DRS cluster active, I tried restarting mgmt service, we use a shared storage (storage iSCSI HP 3PAR and left hand)

  • Im trying to buy photoshop but it keeps saying that its not available in my area. I am in the United States and in my area gets bad! I even updated to the United States, but it is not record the change!

    Im trying to buy photoshop but it keeps saying that its not available in my area. I am in the United States and in my area gets bad! I even updated to the United States, but it is not record the change!

    Hi Mariam,

    It seems that your ID Adobe was initially registered in Pakistan due to which it is not allowing you to make purchases in the United States.

    You can create a new Adobe ID, register in the United States and then it should allow you to make a purchase.

    Let us know if it works or not.

    Thank you

    Yann Arora

Maybe you are looking for