Is it possible to divide the two lines

Hi all

I have two rows in the given order and I wanted to divide.

Rank last month number month
1 19 16
2 50 52


How can I split 19/50 and 16/52?

Thank you
WITH t AS
     (SELECT 1 a, 19 last_month, 16 curr_month
        FROM DUAL
      UNION ALL
      SELECT 2, 50, 52
        FROM DUAL)
SELECT c1 / c2, c3 / c4
  FROM (SELECT MIN (CASE
                       WHEN a = 1
                          THEN last_month
                    END) AS c1, MIN (CASE
                                        WHEN a = 2
                                           THEN last_month
                                     END) AS c2,
               MIN (CASE
                       WHEN a = 1
                          THEN curr_month
                    END) AS c3, MIN (CASE
                                        WHEN a = 2
                                           THEN curr_month
                                     END) AS c4
          FROM t)

Above it is only for your DataSet
Try this... You can get a better solution of Frank

Tags: Database

Similar Questions

  • How to upgrade one of the two lines in double

    I use 11.2.0.3.0

    Is it possible using a CASE statement to find the rows that are double and one of the two lines was updated so that they are all unique?

    What I get is something like this

    Col1 Col2 COL3 COL4 Col5

    1

    1111
    11111
    22222
    22222
    33333
    33333
    44444
    44444
    55555
    55555

    I would change one of the columns in the two lines that makes the unique lines like this

    Col1 Col2 COL3 COL4 Col5
    11111
    12111
    23222
    24222
    35333
    36333
    47444
    48444
    59555
    50555

    Hello

    I don't see how a CASE expression would contribute to this problem.

    In your original message, you said you wanted to update the table, in other words, to permanently change some of the values stored in the table.

    In response, #2, looks like you want to change what is in the table, you just want to replace by new values for col2 in this query, without permanently changing table.  You can do this by using the ROW_NUMBER right in the query, when you thought using a CASE expression.

  • Is it possible to rotate the two iMovie 9 and 10 of the same MacBook Pro?

    Hi all

    Please be gentle with me; I have only just joined the community.

    I have an Apple MacBook Pro 2015 running OS X El Capitan; I used iMovie 10.1.1 and have already fallen on its limits.

    I would like to export to Quicktime so I can have more control over the settings (fps / sound, etc.) of my videos created with 10.1.1 before posting on You Tube, but can do with 10.1.1. I would like to download 9.0.9 and have both versions on my Mac (I understand that you can have both on the same machine) and you can / export to QuickTime with 9.0.9 share.

    I tried to download from the official website of Apple but encounter the following:

    "This update has no need to be installed. A new version of iMovie is already installed"

    It is no possible to navigate around this alert.

    Is it possible to have the two 9 and 10 on the same Mac, iMovie as 9 has never been installed on it, and if yes, how does one?

    Thanks in advance!

    J0hnst0n00

    What you propose, it's really not the way to accomplish what you want to do. iMovie 9.0.9 is not available on the App Store and can be purchased as part of the package iLife online from a third party like Amazon. Also, it is not completely compatible with El Capitan. Certainly not the right approach. I suggest you get MPEG Streamclip against 5 squared, which is downloadable for free. Share your iMovie project to file that will give you a MP4 file. Open in Streamclip and you can save as a Quicktime movie. It has a complete set of options, including the choice of codec, rate, etc. to image size.

  • Is it possible to install the two 2014 of AutoCAD AutoCAD 2007 and on a Win 7 x 64 ultimate?

    Original title: the two AutoCAD 2007 and 2014 on a Win 7 machine

    Hi all

    Is it possible to install the two 2014 AutoCAD AutoCAD 2007 and on a Win 7 x 64 ultimate machine? If so, how to install? That should be installed first please?

    Thank you

    chk the 'HammerHead' response from the link:

    http://www.SevenForums.com/software/333785-both-AutoCAD-2007-AutoCAD-2014-win-7-x64-ultimate-machine.html

  • Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    I tried to do this by using the search but it will find only them, if they occur as a long chain, that is to say "Here's the answer" rather than how they occur in the document it is to say "Here 's" a bunch of information that leads you to 'the answer'. The search feature so standard did not help.

    Then I tried to do this by using the tool to delete (obviously not the application of writing!) because it allows me to search for multiple words or phrases, however it is not highlight what page both are found. I tried to turn on the preference to enable deletions of comments and even if it meant that I could then go through all the comments, it's still not faster than my document is more than 1,000 pages, which meant there were too many total comments for me to be able to easily identify which page had both.

    Any ideas?

    There is no built-in way to search for two strings and limited to show only the results that appear on the same page.

    It can be done by using a custom script, however.

  • How to divide the two numeric fields?

    Hello.

    I tried to divide two numeric fields, called A and B and put the result in a hidden field called C. I need the value for an XML export.

    My question is; How is it possible to divide A and B? I don't have a problem in multipling other areas, but trying to divide I get at most / overflow error.

    Best regards

    Mathias

    Hello

    During the distribution, please check that the value of the field as the line is not null or zero first. So the event calculate the hidden field would look something like this:

    if (b.rawValue == null || b.rawValue == 0)
    {
         c.rawValue = "0"; // If c is a numeric field. If it is a text field then you could put a message "division by zero"
    }
    else
    {
         c.rawValue = a.rawValue / b.rawValue;
    }
    

    Hope that helps,

    Niall

  • Is it possible to use the power line is in PlotText?

    Hello

    I was wondering if I could print two lines just below the other on a chart using PlotText control and a jump in the line text string? Unfortunately, I could not do it using "bla\r blah" or "line1\n line2 '... Is there such a possibility?

    Thank you

    Wolfgang

    Hi Wolfgang,.

    Unfortunately, the current PlotText function does not support the escape characters. This is a known issue and should be resolved with the next major version of the CVI. I'm sorry, that there is no better solution for now.

    Best regards

    Peter

  • The two lines EX90 and add speed dial

    My friends, I need help in this case, we replaced digital phone with EX90 new to our general manager. but there is some functionality was available on the old phone:
    1 - the old phone has buttons around the screen as a speed dial buttons for certain numbers of employees
    2 - the old phone has two lines one private and one is the direct line

    Here, he wants the same features on the EX90:
    1. I configured the favorite on the EX90 as a shortcut, but he wanted the speed Dial buttons appear directly on the screen for

    press about this directlry.
    2 - I have configured the EX90 on CUCM and added the second row but he only appeared, if there is a method to allow

    calls on the (direct and private calls on different lines) EX90

    Please I need your urgent help

    The DefaultPanel Option is only in more recent versions of TC software, I do not remember what version it appeared in, but it is there in the last TC7.1.3.  If you don't, you probably use an older version of software on your EX.

    It is located in the web interface under Setup, System Configuration, UserInterface touchscreen Panel default.

    The options are: none, last, list of contacts, MeetingList and keyboard.

    The option of contact list

    Another option (although, as for a simple speed dial) is the installation Service that puts a button in the upper left corner of the touch screen.  Note: Only facility Service 1 is available in the Panel even if you configure 5 of them.

    Wayne
    --
    Please rememeber the frequency responses and mark your question as answered as appropriate.

  • Hyperlinks on the two lines does not not on pdf

    I create hyperlinks (to web pages) in InDesign CS 6 then pdf it. However, all links spread over two lines do not bind to the full hyperlink for example they only link to the first line.

    For example:

    http://EUR-Lex.europa.EU/legal-content/en/

    TXT /? URI = celex:32006 L 0025

    When I got the InDesign pdf file in Acrobat (with hyperlinks marked in the window) it links only to the first line, for example


    http://EUR-Lex.europa.EU/legal-content/en/


    Another example:


    www.PLOSOne.org/article/info:doi/10.1371/

    Journal.Pone.0053379


    The really strange thing is that in some cases it works OK for example:


    www.NHS.uk/ipgmedia/national/Epilepsy%20Action/Assets/

    photosensitiveepilepsy.PDF

    Can anyone shed some light on this for me - it's really frustrating...

    Thank you

    Sheila

    It must create the hyperlink in the hyperlinks Panel (window > interactive > hyperlinks) as a URL. If you have not done so, Acrobat tries to read the URL from the text in the PDF file and will stop with each statement or other specific characters.

  • StartDrag, possible to move the two objects?

    Hi, thanks for the response. Is it possible to connect the x coordinates y of the two objects so that if there are a bunch on one, when it is moved on the other moves with it?

    Thank you very much

    Frank

    Frank,

    > Hi David, thanks a lot! I use a.s. 2. Code would be very
    > very appreciated!

    Here's a way to do it.

    clipA.onPress = function (): Void {}
    this.startDrag ();
    var offsetX:Number = clipB._x - this ._x;
    var offsetY: Number = clipB._y - this ._y;
    clipB.onMouseMove = function (): Void {}
    This ._x = clipA._x + offsetX;
    This ._y = clipA._y + offsetY;
    updateAfterEvent();
    };
    };
    clipA.onRelease = function (): Void {}
    this.stopDrag ();
    clipB.onMouseMove = null;
    };

    clipA delivery Manager is two things: a) starts a normal for brake
    itself and (b) note the distance of its own location from clipB,
    then, it sets an onMouseMove to clipB handler that updates to this clip
    position with respect to offsets included just. The
    updateAfterEvent() function is not necessary, but it makes the smoother movement
    to display the lowest rate.

    Do clipB reciprocate, to manage the same events for clipB, only
    reverse the consequences:

    clipB.onPress = function (): Void {}
    this.startDrag ();
    var offsetX:Number = clipA._x - this ._x;
    var offsetY: Number = clipA._y - this ._y;
    clipA.onMouseMove = function (): Void {}
    This ._x = clipB._x + offsetX;
    This ._y = clipB._y + offsetY;
    updateAfterEvent();
    };
    };
    clipB.onRelease = function (): Void {}
    this.stopDrag ();
    clipA.onMouseMove = null;
    };

    David Stiller
    Adobe Community Expert
    Dev blog, http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Is it possible to combine the TWO Apple id

    I had an older apple ID that I made a purchase with and then I added new ID apple later and one of my purchases (subscription journal) does not open on my i pad in the apple ID

    I think that when I subscribed first I used my old apple ID and now I do not really use it, but the application has stopped working

    I think the subscription works if I can combine of the two apple ID

    Can someone help, please notify

    Doug

    Hi DougieFresh1963

    Apple ID are not cumulative and purchases cannot be transferred.

    You know your credentials of the former Apple ID?

  • It is possible to color the last line (or word) at the bottom of a page?

    Just to mark the end of the image in a page?

    Thank you.

    This sets the last line of each block of text in the document to an existing named red shade. If a problem might be jumping frames where you don't want to change, or what happens when the text is redéroule?

    Tell application "Adobe InDesign CS6"

    f the value of each block of text in the active document

    the value s swatch 'Red' in the active document

    Repeat with x in f

    -replace line with Word to get the last word

    The object reference of the last line of the content of the p-value x

    set the fill color of p to s

    end repeat

    tell the end

  • Difference between the two lines in percentage

    Hi all

    I have a requirement to report which should be grouped by months and in the second field all the records for this month, but I have to add a third field that shows the difference of the TOTAL REGISTRANTS BETWEEN above and below months and also the percentage to increase or decrease the number of records between the months... In fact, I am unable to think even of any solution. There is the report look at an end parameters to select the month for which the report should be displayed.

    The report is a bit like that and is grouped by month:

    Month | Total records | Percentage and difference
    January | 10.
    February | 20. 100% 10
    March | 30. 50% 10
    ....
    ...

    But I can't find a way to incorporate data for column 'percentage and difference '.

    I appreciate all the suggestions and possible help...
    I can provide any other details if necessary if it is not clear...

    Thanks and regards,
    Solomon

    Declare two variables and store the current and previous lines count value.
    With this, you can calculate the values of the difference and percentage

  • Try to divide the two numeric fields and have response in the third field num

    Okay, I do something wrong and can not understand it.  I use the code below in the field of PSF of my form to divide two different fields digital and for the life of me I can't understand why it does not work.  I guess it's something simple.  I downloaded the form.  Please take a look at the form and me know where I am on leave.  You almost have something simple and I just don't see

    < activity = "click on" name = "event__click" >

    < script contentType = "application/x-javascript" >

    If (NumericField13.isNull |) NumericField13.rawValue == 0)

    {

    NumericField28.rawValue = '0 '.

    } elseif(NumericField27.isNull ||) NumericField27.rawValue == 0) {}

    NumericField28.rawValue = '0 '.

    } else {}

    NumericField28.rawValue = NumericField13.rawValue / NumericField27.rawValue;

    }

    < /script >

    < / event >

    I think it has something to do with the way which is made the division.  I think he's trying to divide by zero, although at this time I tried several different if/then instructions and can't see where I go into the equation, so I tried the above only a click again and could not get that to work either.

    Thanks in advance for your help.

    Justin

    First thing is that you have this script running on the click... event so that your code will not run until a user clicks on the field. I suggest that you put it

    the calculate event. In this way, every time one of the other values named in the formula change t

    hen she'll recalculate this field.

    Second, there was a script error in your formula... I modified to look like this (it seems just more logical that way to me)

    If (NumericField13.isNull |) NumericField13.rawValue == 0) {}
    NumericField28.rawValue = '0 '.
    } else {}
    if(NumericField27.IsNull ||) NumericField27.rawValue == 0) {}
    NumericField28.rawValue = '0 '.
    } else {}
    NumericField28.rawValue = NumericField13.rawValue / NumericField27.rawValue;
    }
    }

    Third, your shodul of NumericField27 have a default value 1 or you should make its value acheck so that she does not have a possibility to get a 0 or your division will fail.

    Finally, shodul you rename your fields have insstead of generic names like numericField XX more descriptive names. Many people like to know the type of field to the name then, instead of NumericField27 SQFT_NumFld what would you say? With this technique, I can say immeadiately field in which you speak (Square Footage) and its type (numeric). Just my 2 cents worth!

    Paul

  • It is possible to activate the two sound devices simultaneously?

    Have windows 7 64 bit with two separate devices.  One is a set of speakers that are connected directly to the audio port of the PC.   Second device is Sony S - Air USB that transmits audio through 2.4 ghz for remote speakers.   Each device works very well when it is on the default device, but I can't seem to turn on both devices at the same time.  Hold both enabled and have sound from speakers for computers and as well remotely.   Is this possible?

    Quite simply... # Unfortunately it is not that simple, you must run a subgroup on an outboard mixer or similar output style sound card like the M-Audio Delta 44 66 to do this.  An audio source from your computer into a blender & out 2 different sources (speakers).  You can buy cheap like the Behringer Xenyx 802 mixer but your wireless USB will be useless in this case & you will need to find or make a digital decoder of jack Plumb desired 1/4.  If you need more explanation I can try to help.

    With the option of the sound card, you will need software of recording and mixing for 'send' or 'directing' the release of the pair desired output on the sound card.

    If anyone has a way to do this without using outboard or - style software/card its mix recording gear, I of course want to know.

    See you soon!

Maybe you are looking for