Total time in a slope

Hello

WITH DATA AS)

SELECT '1000 ' EMPLID, DATE' 2015-11-22' EFFDT, 'ABC' DOUBLE RANK

UNION

SELECT '1000 ' EMPLID, DATE' 2015-04-19' EFFDT, 'ABC' DOUBLE RANK

UNION

SELECT '1000 ' EMPLID, DATE' 01-2014-15' EFFDT, "CABIN" GRADE OF DOUBLE

UNION

SELECT '1000 ' EMPLID, DATE' 2013-11-20' EFFDT, 'ABC' DOUBLE RANK

UNION

SELECT '1000 ' EMPLID, DATE' 2013-03-12' EFFDT, "CABIN" GRADE OF DOUBLE

UNION

SELECT '1000 ' EMPLID, DATE' 2014-05-10' EFFDT, '90' GRADE OF DOUBLE

UNION

SELECT '1000 ' EMPLID, DATE' 2015-07-29' EFFDT, '91' GRADE OF DOUBLE

) SELECT * FROM DATA

I have data like above and need to know the total number of months that the employee was in the ABC and CAB only grades. I need to ignore other qualities. Help, please.

So, you want just the total number of months in these 2 categories...

WITH DATA AS)

SELECT '1000 ' EMPLID, DATE' 2015-11-22' EFFDT, 'ABC' DOUBLE RANK

UNION

SELECT '1000 ' EMPLID, DATE' 2015-04-19' EFFDT, 'ABC' DOUBLE RANK

UNION

SELECT '1000 ' EMPLID, DATE' 01-2014-15' EFFDT, "CABIN" GRADE OF DOUBLE

UNION

SELECT '1000 ' EMPLID, DATE' 2013-11-20' EFFDT, 'ABC' DOUBLE RANK

UNION

SELECT '1000 ' EMPLID, DATE' 2013-03-12' EFFDT, "CABIN" GRADE OF DOUBLE

UNION

SELECT '1000 ' EMPLID, DATE' 2014-05-10' EFFDT, '90' GRADE OF DOUBLE

UNION

SELECT '1000 ' EMPLID, DATE' 2015-07-29' EFFDT, '91' GRADE OF DOUBLE

) ,

as od)

SELECT wagneur,

Month MONTHS_BETWEEN ((effdt, 1, SYSDATE) of LEAD OVER (PARTITION BY emplid ORDER BY effdt), effdt)

DATA d

)

SELECT d.emplid, sum (months), trunc (sum (months)) complete_months
PERIODS d

WHERE grade in THE title ("CAB", "ABC")

D.emplid GROUP

ORDER BY emplid.

Tags: Database

Similar Questions

  • How to insert as an entry within the formula variable, the total time on the scope window?

    How to insert, as an entry within the formula variable, the window of total time on the scope (i.e. of 20ms/div x 10 div = 200ms)?

    HERE'S A SAMPLE QUESTION:

    FORMULA FOR INTEGRAL ACTION:

    STATISTICS:

    Input variable: DPO4034 (CH1);

    Box: number of samples.

    FORMULA

    Input variable 0: DPO4034 (CH1); alias: x 0

    Input variable 1: 'time window Total out of scope?. " alias: x 1

    Input variable 2: number of samples (CH1); alias: x 2

    Under the operation Configuration: formula

    Y = (x 0 ^ 2) *(x1/x2)

    Output: Data 1 (CH1)

    THEN, WITH THE HELP OF STATISTICS:

    Input signal: data processing 1 (CH1)

    Checkbox: SUM

    Output: CH1 integral Action [has ^ 2s].


  • Why the total time required for the test sequence is different during the test runs

    Hello

    -J' have different test resources to test our product which includes engines and the NOR-Box (6351).

    -Number of test files in sequence that are called during the test (ca. 20)

    -The problem is that when I run these test sequence files separate (say only 3 out of 20), total time by these tests are t1, t2 and t3, but when - I left all 20 tests to run without jumping all the time needed by the 3 tests above is t1 + 60 s, t2 + 80 s and t3 + 50sec. Why it is so and how can I avoid this problem.

    -The tests are motors to move, take samples or box then save them on my computer after testing the limits. Since they are time critical, when I do all the running tests in a test go a lot do not PASS. I can't run them separately because it takes more time, more interference by user and also more than one report that is not desired.

    -J' tried unloading after execution steps, but it did not help.

    Kind regards

    RB

    This probably depends on that made your sequence. Have you tried shrink where extra time is being spent? You can time how long different parts of your sequence are following the steps of the expression as follows:

    Locals.StartTime = Seconds()

    Locals.ElapsedTime = Seconds() - Locals.starttime

    You can also watch time module in your reports. There is nothing specific on TestStand that should cause some sort of slow down like this. I recommend trying to figure out where the extra time is being spent. I suspect once you do, the cause will become obvious.

    -Doug

  • Link to freeware to limit the total time used on a PC (not just at the moment where)-for real free, no demo

    HI everyone, I've seen several posts where people are asking for a free tool to limit the total time children are allowed on a PC by day.  I think that Windows 8 has this feature as part of its Parental controls, but I found this:
    http://www.romacocanada.ca/timeout/

    It is configured on a per-user basis, which means that you must log in as each individual and configure it.   A bit tedious, but you can customize it by kid I guess.

    It allows you to follow the total time per day and limit the time spent per session.  It will warn the user at a time you specify.  It also allows / the blocking program Web site, but I do not set up these features.

    I just installed it, so I can't guarantee how it works right now, so we'll see.

    Hello

    Thanks for sharing this valuable information. I suggest you to see the following links for parental control.

    What's new in Windows 8 family security
    http://msdn.Microsoft.com/en-us/library/Windows/desktop/jj155495 (v = vs. 85) .aspx

    Parental control
    http://Windows.Microsoft.com/en-us/Windows7/products/features/parental-controls

  • I need a variable that I can use to display the total time spent in a course.

    I want to create a personalized certificate of completion that the learner can print at the end of a course.

    I would like to have the total time spent in the price that is displayed on it, but I'm not sure of the variable to use.

    Take a look at: time display information - Captivate blog

    After reading if you have any other questions, fire away.

  • Report total time of LMS

    I work in 7 Captivate and editing courses SCORM 1.2 s and the downloading of an LMS. For some of my classes a total time is indicated, and it is not for others. I see no difference in the way I put courses in place. Is there a setting that handles this? Here are the screenshots of the setting that I put in place. They are the same on two different courses, one being reported and the other is not.

    ScreenHunter_170 Oct. 14 11.53.jpgScreenHunter_169 Oct. 14 11.53.jpgScreenHunter_171 Oct. 14 11.53.jpg

    Thanks Rod to scan it. After working with the LMS administrator, they discovered that there is an error on their end.

    Captivate automatically try to capture this information and report.

  • How can I calculate the total time in java?

    Hello!

    I need to calculate the total time!

    For example I start time:
    Format formatter1;
    Date date1 = new Date();
    formatter1 = new SimpleDateFormat("hh:mm:ss");
    Dim startTime = formatter1.format (date1);
    startTime = "14:20:40.

    And I have finishing time:
    Format formatter2;
    Date2 date = new Date();
    formatter2 = new SimpleDateFormat("hh:mm:ss");
    String finishTime = formatter2.format (date2);
    finishTime = '08:30:55;



    Also, having calculated manually, I get the total time: '18:10:15.

    How can I calculate the total time in java? (Using formatter1 and formatter2 I guess)

    What I need is to print 'total 18:10:15 '.

    Thank you!

    800512 wrote:
    I did the following, but I think something's wrong here:

    I've defined before: Date date1 = new Date(); Date2 date = new Date();
    And it should be exactly 5 seconds between them.

    I found the delta between date1 and date2:

    Format formatter = new SimpleDateFormat("HH:mm:ss");
    timeInMilliFromStart long = date1.getTime () - date2.getTime ();
    Date date3 = new Date (timeInMilliFromStart);
    String timeInSecFromStart = formatter.format (date3);

    and I still get
    timeInSecFromStart = 02:00:05

    But it should be exactly 00:00:05.

    What is a problem?

    Because, as I said, a Date to measure a moment in time, not a period. So when you have 5000 ms, and you that transform a Date, this means that 5 seconds after the time, which equals 00:00:05.000 01/01/1970 GMT.

    As I said, if you are not currently in GMT, then you must set the DateFormat GMT TZ. Right now, it's to show you the time in your TZ. If you have included the date in your SimpleDateFormat, you would see the 01/01/1970 or 31/12/1969, function that TZ you find.

    Bottom line: you try to use these classes in a sense they are not intended for, and while you can get the results you want for a limited set of entries if you understand how these classes and how to work with it, it is a fragile approach and comes with all sorts of warnings warning.

  • How do I get the total time elapsed displayed on the stage?

    Hello

    I have a program that will count every second past with a key press to the other, in the exit sign that I get all the time what past (per second), but here the total number displayed in a text box on the stage at the end.  This will be the total time between supports.

    Thanks for your help, it is very much appreciated as a newcomer in Actionscript.

    Also, I use video clips of Doug Winnie to help me so if you know a particular episode that will cover then please let me know.

    Mick

    use a variable to store this value and increment when appropriate.

  • hide the total time in TOC

    Hello

    How do hide you the total time that appears in the table of contents next to the search option?

    Thank you!

    Hello

    Unfortunately, you can not.

    Perhaps by exporting to Flash, but that is about the only way that I can not understand.

    You can submit a feature request (like formula) to ask for it in a future version.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • Addition of 2 time formulas in the text boxes to get a total time

    I have tried to add 2 calculations of time together to get a total time rounded to the minute, but were unsuccessful.

    What I have right now in the field "TimeIn1 and TimeOut1" is the calculation when the click on "$=Num2Time (Time ()) '

    I'm working on

    to ensure that the person using the form can click in the time zones and have the time entered automatically. So I want to add 4 fields

    to get a total time spent on a project.

    The 4 fields are;

    TimeIn1

    TimeOut1

    TimeIn2

    TimeOut2

    Total time

    I need to the equasion like that;

    (Timein1 + (TimeOut1-TimeIn2) + TimeOut2) / 60 = TotalTime

    Can someone help me. Is the best way to run the formula as a formcalc or a Java Script better.

    Please help this newbie.

    The 'Time2Num()' function converts a time range for the number of milliseconds of the date of the time for LiveCycle Designer. It is the optional parameters for a string of format and the locale identifier string that can perform the more reliable conversion function will know the format of the string. I found using the property "formattedValue" also contributes to the maintenance of reliability.

    get the time in milliseconds
    var In1 = Time2Num (TimeIn1.formattedValue, "HH: mm")
    var Out1 = Time2Num (TimeOut1.formattedValue, "HH: mm")
    var In2 = Time2Num (TimeIn2.formattedValue, "HH: mm")
    var Out2 = Time2Num (TimeOut2.formattedValue, "HH: mm")
    calculating elapsed time in hours for the entry and exit times
    ((OUT1-IN1) + (Out2 - In2)) / (1000 * 60 * 60)

  • AudioPlayer does not display the horizontal color and elapsed time of the mpe3file (only total time)

    In AudioPlayer widgets das invaluable problem 3: der outwardarrondie nicht den Verlauf one shows Balk, auch nicht die vergangene Abspielzeit of mp3 files.

    Nur die total of mp3 files. In musegrid, musegain und freiem audioplayer.

    Time played, time remaining, etc. should be included in itself the video widget embedded code. I suggest you to contact the original publisher of the widget.

    Thank you

    Sanjit

  • Total time of the project

    Hello

    I use 8 Captivate to create a sensitive project. How can I determine the time of my presentation. I like to keep my session of learning less than 10 minutes. I have several branches in my session. Is there a way to see the length of the total duration of each branch?

    Thank you

    Peter

    In Captivate you 'Editor time' which can be easily calculated, but can differ a lot of actual time spent by the user in a course because that time depends also on suspend interactive objects. This time can be measured over the life course. Take a look at this post, where I tried to explain:

    Displays the time information - Captivate blog

  • Start a variable to a percentage of the total time?

    Hi all

    I am trying to find a way to call a function in the last 30 seconds of the film. The problem here is that the total duration of the video is changing because it is connected to a database that imports different clips depending on the situation. So basically, I need code to call a function to START with 40 seconds in the video or a certain percentage of the video.

    This is where I am with the code:

    var songLength:Number = oasisFlashDuration/1000; It of shooting some video and determines the length of the film

    Then: What I tried to use to start this variable 40 seconds from the end.

    var startCredits:Number = songLength - 40;  //

    or

    var startCredits:Number = oasisFlashDuration/1000-40; / /

    Could someone help?

    Thank you!

    If you know how long that you want something to happen from a different starting point, you can use the Timer class to wait for time to pass before acting.  The basic menu would be...

    var: timer = new Timer (startCredts * 1000, 1);  time is specified in msec

    timer.addEventListener (TimerEvent.TIMER, triggerCredits);

    function triggerCredits(evt:TimerEcvent):void {}

    start what you intend to start

    }

    Timer.Start ();  run this line when you want to start the song

  • When was the last time that 5.5 ESXi host not re-initialized and total times restarted last month.

    Hi team,

    We have more than 100 ESXi host in our environment, and we need to know when was the last time ESXi host rebooted and no times restarted last month. Please help me get the power cli script. Any help will be much appreciated. Thank you

    Thank you

    VMware tech

    OK, so the ESXi nodes were hard started (as if you pushed the power button).

    This is probably why the task for a planned restart does not turn upward.

    Do you see the ESXi nodes with the following script?

    It shows the events where the connection to a host has been lost.

    $start = (get-Date). AddDays(-7)

    Get-VIEvent - MaxSamples ([int]: MaxValue)-start $start |

    where {$_-is [VMware.Vim.HostConnectionLostEvent]} |

    Select CreatedTime,@{N='VMHost'; E={$_. $host.name}}

  • How can I add the total time in the views

    In the following view, he noted that I spent 189 ms making the modified regions. When I developed the business it does not match this value. I count 82?

    Screen Shot 2013-03-18 at 15.10.33 PM.png

    Also, is it possible to see / find the objects are connect to the FTE text and what images are decompression? Maybe I can find it in another opinion? My rendered display list shows some 1000 objects. : P

    Right click on the header of the table and turn on the column 'free time '. You will see that time not given to children is explained by the free time of the parent. Andy Hall wrote a great blog explaining this:

    http://aphall.com/2013/03/making-sense-of-Scout/

    If you turn on DisplayList rendering of details in the settings for new sessions, you'll be able to see objects in DisplayList rendered Panel (your swf should be opted for advanced telemetry).

    The next version of Scout will have some search features that will make it easier to find specific text in Scout through the different panels, so that should help you!

Maybe you are looking for

  • change of rescue for apple ID account

    I have my current password of my Apple ID account, but I would like to change and also change the enamel of relief.As I have more access to my backup email. and I could not remember the answer to the security question. Could someone guide me pls how

  • How to manage the battery when the AC is plugged into Satellite?

    Hello I just purchased Toshiba laptop first and want to get the best of the life of the battery, like that on my last laptop is now fuck. My question is: if I have to run the laptop almost always from the power supply, is it possible or desirable act

  • INSTALL FAILL CODE 800070103

    WINDOWS VISTA TEN TIMES TRY O IN STALL UPDATE EVERY TEN is NOT MICROSOFT SOFTWERE HUMBLE WHY can't YOU'll DOWNLOAD HISTORY OF UP DATE AND SEEK to THE PROB I have not WRITDE this SOFTWERE if I WOULD HAVE has WRITTEN IT WOULD BE ON ME to CE SOFTWARE RE

  • Checkboxes in Windows Media Player (W7)

    In iTunes 11, there are check boxes to the left of the list items. WMP 12 also has this feature? I can't understand.

  • Set the network settings on Coredump PowerCLI problem

    I want to use PowerCLI to set my 5.0 vSphere hosts so that they make a coredump on my server vCenter. I have a vCenter server with the installed Dump ESXi collector installation. I am familiar with the help of the CLI and the local RCLI to set these