Sum time spent for breaks

name id timein timeout breakin breakout currentdate
karthik 1 9.40AM 5.20AM 11.00AM 11.10AM 20-APR-2007
karthik 1 9.40AM 5.20AM 12.00PM 12.10PM 20-APR-2007
karthik 1 9.40AM 5.20AM 1.30PM 1.45PM 20-APR-2007
karthik 1 9.40AM 5.20AM 2.30PM 2.45PM 20-APR-2007
karthik 1 9.40AM 5.20AM 4.00PM 4.30PM 20-APR-2007
my need is i want to sumt the total hours spent for breaks from morning to evening.
so please any one please give me query for this please.

Like that ?
SQL> with tbl as
  2  (select 'karthik' c1, 1 c2, '9.40AM' c3, '5.20AM' c4, '11.00AM' c5, '11.10AM' c6, to_date('20-A
PR-2007','DD-MON-YYYY') c7 from dual union all
  3   select 'karthik' c1, 1 c2, '9.40AM' c3, '5.20AM' c4, '12.00PM' c5, '12.10PM' c6, to_date('20-A
PR-2007','DD-MON-YYYY') c7 from dual union all
  4   select 'karthik' c1, 1 c2, '9.40AM' c3, '5.20AM' c4, '1.30PM'  c5, '1.45PM'  c6, to_date('20-A
PR-2007','DD-MON-YYYY') c7 from dual union all
  5   select 'karthik' c1, 1 c2, '9.40AM' c3, '5.20AM' c4, '2.30PM'  c5, '2.45PM'  c6, to_date('20-A
PR-2007','DD-MON-YYYY') c7 from dual union all
  6   select 'karthik' c1, 1 c2, '9.40AM' c3, '5.20AM' c4, '4.00PM'  c5, '4.30PM'  c6, to_date('20-A
PR-2007','DD-MON-YYYY') c7 from dual )
  7  select c1, c2, to_char(trunc(sysdate)+sum(to_date(c6,'HH12.MIAM')-to_date(c5,'HH12.MIAM')),'HH24:MI') sum_break_h_mi
  8  from tbl
  9  group by c1,c2;
C1              C2 SUM_B
karthik          1 01:20
SQL> Nicolas.

Similar Messages

  • Metrics "Database Time Spent Waiting (%)" is at ... for event class "Commit

    Hi guys
    I'm getting this warning every 20 minutes from Enterprise Manager 10g: Metrics "Database Time Spent Waiting (%)" is at 67.62891 for event class "Commit". My database is an Oracle 10g 10.2.0.4 (Linux x84_64) with dataguard, one physical and one standby networked at 100Mbit. I have 3 groups of 50M redo log with a low volume of transaction for now. Here are some metrics numbers:
    SQL> select sum(seconds_in_wait),event from v$session_wait group by event;
    SUM(SECONDS_IN_WAIT) EVENT
    121210 SQL*Net message from client
    0 Streams AQ: waiting for messages in the queue
    18 wait for unread message on broadcast channel
    6 LNS ASYNC end of log
    30 jobq slave wait
    37571 rdbms ipc message
    384 smon timer
    35090 pmon timer
    I tune the my listerners for Dataguard using the documentation. I don't know what to tune anymore, is someone has a clue.
    Thanks,
    Chris

    cprieur wrote:
    Metrics "Database Time Spent Waiting (%)" is at 67.62891 for event class "Commit"
    I'am also getting this message at a regular time:
    Metrics "Database Time Spent Waiting (%)" is at 64.09801 for event class "Network"
    The report, I was sent only to indicate the time spent on: SQL*Net message from client
    I believe that these metrics are explained here (near the bottom of the page):
    http://download.oracle.com/docs/cd/B19306_01/em.102/b25986/oracle_database.htm
    There are only two wait events in the Commit class (on 11.1.0.7):
    log file sync
    enq: BB - 2PC across RAC instances
    log file sync waits happen when sessions issue a COMMIT or ROLLBACK. Sessions will wait on this event until LGWR completes its writes to the redo logs (LGWR will likely wait on the event log file parallel wriite while waiting for the write to complete). I believe that your DataGuard configuration may contribute to the long waits experienced by LGWR, and it may be made worse by the network connection.
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28294.pdf
    "Maximum availability - This protection mode provides the highest level of data protection that is possible without compromising the availability of a primary database. Transactions do not commit until all redo data needed to recover those transactions has been written to the online redo log and to at least one standby database."
    So, if Maximum availability is configured, the sessions will have to wait for the redo to be applied to the remote database.
    At the system-wide level you will almost always be able to ignore the SQL*Net message from client wait events. At the session level this wait event has a more significant meaning - the client computer is not actively waiting on a response from the database instance - the client is either sitting idle, or performing client-side processing.
    Sybrand, if he joins this thread, will likely be able to provide a more complete answer regarding DataGuard's contribution to the Commit wait class.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • I have an iPhone 4S, iPad and MacBook Air.  I'm looking for an app or program where I can track time spent of specific projects each day and also document details of each project.  Is there anything available that is synced through iCloud?

    I have an iPhone 4S, iPad and MacBook Air.  I'm looking for a program or app that I can sync though iCloud that will allow me to us all of these devices to track time spent on projects each day along with the ability to add specific information about each project.  Any suggestions are appreciated! Thanks!

    I recommend you consider Omnifocus.  It is a task management program which runs on the Mac, Iphone & Ipad. I use it for task management and project management.  It let's you store additional information as well.   I sync all three devices through a Mobile Me account and I can enter data on any device and it is available on all devices.  I believe you can also sync through Dropbox.  I'm not sure that you can sync through iCloud yet.  The link to their website is:  www.omnigroup.com.  There may be less expensive alternatives, but this one meets my needs and syncs very well across all devices.

  • Waiting (%)     Metrics "Database Time Spent Waiting (%)" is at 69.64818 for event class "Commit"

    Hi,
    Can any one help me on this warning, i got this warning on ORACLE ENTERPRISE MANAGER
    Waits by Wait Class
    Database Time Spent Waiting (%)
    Metrics "Database Time Spent Waiting (%)" is at 69.64818 for event class "Commit"
    Below are our environment details:
    RDBMS: 10.2.0.4
    Oracle E-Business suite: 12.0.6
    OS: Oracle Sun 10
    Please suggest.
    Thank you.

    Please see the following docs.
    How to Disable Alerts for The Database Time Spent Waiting (%) Metric? (Doc ID 1500074.1)
    "Database Time Spent Waiting (%)" at 100 for Event Class "Other" when Database is not Under Load (Doc ID 1526552.1)
    Thanks,
    Hussein

  • Database Time Spent Waiting (%) for Concurrency

    Oracle 11g 11.1.0.6 Standard Edition
    Windows 2003 Server SP2
    I have recently begun building a development database. Enterprise Manager has popped up the following message Metrics "Database Time Spent Waiting (%)" is at 85.20092 for event class "Concurrency" but it won't show me any further info as I don't have access to the Database Diagnostic Pack.
    Is there any other way to investigate this metric alert?

    Oracle 11g 11.1.0.6 Standard Edition
    Windows 2003 Server SP2
    I have recently begun building a development
    database. Enterprise Manager has popped up the
    following message Metrics "Database Time Spent
    Waiting (%)" is at 85.20092 for event class
    "Concurrency" but it won't show me any further
    info as I don't have access to the Database
    Diagnostic Pack.
    Is there any other way to investigate this metric
    alert?You might start by looking at the wait events at the system level. Monitor the changes in the wait events at the system level when response time is poor. Keep the time delta between the start and end captures short, possibly 5 to 15 minutes. Start by executing a SQL statement such as this (possibly capture the output in a file or an application such as Excel):
    SELECT
    FROM
      V$SYSTEM_EVENT;You may notice that there is a column named WAIT_CLASS returned by the above query, so you might use that column to restrict the rows returned by the query.
    Wait 5-15 minutes, and then repeat the query. Subtract the values from the first execution for TOTAL_WAITS, TOTAL_TIMEOUTS, and TIME_WAITED from the second execution for the same wait events. Check the Oracle Performance Tuning manual for the meaning of the wait events, and how to address problems that are found.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Metrics "Database Time Spent Waiting (%) is ar 100 for event class "Applica

    Metrics "Database Time Spent Waiting (%) is ar 100 for event class "Application".
    i get this error in database. help me regarding this error.

    Streams AQ: qmn coordinator idle wait     31     16     42598     1374.12     425976281     989870553     2723168908     6     Idle
    Streams AQ: qmn slave idle wait     15     0     41599     2773.27     415990747     1830121438     2723168908     6     Idle
    Streams AQ: waiting for messages in the queue     83     83     41478     499.73     414776290     3955192389     2723168908     6     Idle
    jobq slave wait     134     131     39906     297.8     399055017     782339817     2723168908     6     Idle
    Streams AQ: waiting for time management or cleanup tasks     7     4     3778     539.71     37779540     3702640206     2723168908     6     Idle
    class slave wait     3     3     1499     499.54     14986144     1055154682     2723168908     6     Idle
    Streams AQ: qmn coordinator waiting for slave to start     2     1     500     249.95     4999066     1565566389     1893977003     0     Other
    LGWR wait for redo copy     1     0     0     0     1     4266849434     1893977003     0     Other

  • Metrics "Database Time Spent Waiting (%)" is at 0 for event class

    I am getting following warnings ,may anyone expalin it to me
    Metrics "Database Time Spent Waiting (%)" is at 0 for event class "Configuration"
    Metrics "Database Time Spent Waiting (%)" is at .40757 for event class "Network"
    Metrics "Database Time Spent Waiting (%)" is at .40757 for event class "Cluster"

    You should have a look into Database Performance Guide.
    This metrics shows how much time your database is spending on waiting for wait events of folowing classes
    Best Regards
    Krystian Zieja / mob

  • Database Time Spent Waiting (%) for event Commit

    I have a 10G R2 database that has started to report this alert every minute.
    Metrics "Database Time Spent Waiting (%)" is at 61.25661 for event class "Commit"
    I have not changed any metric configuration and the really weird thing to me is that the database is completely idle. I am having difficulty finding good documentation on the Metrics and alerts. I read something that seemed related and it said the commit class has only one alert and that is for redo log write confirmation. There are no users other than myself connected to this database and I am just monitoring with the EM. Any ideas?
    -Tim

    Update...
    The IBM rep said he could send someone over for $1500 day. Right. So I read over the DS4300 manuals again but nothing really stood out. However I thought it would be worth noting that when the write cache was turned 'off' for the logical with the redo logs the 'log file sync' wait event would stay below the warning threshold (50%) and average about 18%. With the write cache 'on' the wait event would always be above the warning threshold. Performance of the database overall is still degraded with either setting. I am going into production with the redo on a local mirror. Additionally I tested segment sizes of 64 ,32, and 16kb. The 16kb did not effect the 'log file sync' waits but proves to be excellent for transaction performance overall.
    -Tim

  • Metrics "Database Time Spent Waiting (%)" is at 23,02268 for event class "C

    Hi,
    on 10g,
    I have this alerte in DB control home page :
    Metrics "Database Time Spent Waiting (%)" is at 23,02268 for event class "Commit"
    Should I do any action/correction ?
    Thank you.

    user522961 wrote:
    Thank you.
    Here is the result :
    SQL> select sid, event, p1, p2, p3 from v$session_wait where event not in ('SQL*Net message from client', 'rdbms ipc message', 'pipe get', 'PL/SQL lock timer',
    'pmon timer');
    SID EVENT                                                                    P1         P2      P3
    163 jobq slave wait                                                           0          0       0
    165 Streams AQ: waiting for messages in the queue                          8808  875118900       5
    166 SQL*Net message to client                                        1413697536          1       0
    167 wait for unread message on broadcast channel                      865275080  865241852       0
    169 Streams AQ: qmn slave idle wait                                           0          0       0
    170 Streams AQ: waiting for time management or cleanup tasks                  0          0       0
    179 Streams AQ: qmn coordinator idle wait                                     0          0       0
    194 smon timer                                                              300          0       0
    8 rows selected.Regards.As per above result, it seems there was no critical wait event or something occurs during frequent commits.
    If you know which application or batch processing caused this, for the best result, you should rerun this query during that workload.

  • Metrics "Database Time Spent Waiting (%)" is at 83.25965 for event class

    Hello,
    when i log into em console, i have alert below,
    "Metrics "Database Time Spent Waiting (%)" is at 83.25965 for event class "Commit"
    so, what do i need to do? i have no idea about this,
    is it a critical error? is there any solution?
    thank you
    Ugur

    Ugur MIHCI wrote:
    Hello,
    when i log into em console, i have alert below,
    "Metrics "Database Time Spent Waiting (%)" is at 83.25965 for event class "Commit"
    so, what do i need to do? i have no idea about this,
    is it a critical error? is there any solution?
    thank you
    UgurProbably what you would want to do in this case is to first determine which wait events are in that event class:
    {code}
    SELECT
    NAME
    FROM
    V$EVENT_NAME
    WHERE
    WAIT_CLASS='Commit';
    NAME
    log file sync
    enq: BB - 2PC across RAC instances
    {code}
    If you are not using RAC, the second of the above wait events probably does not apply. Next, you need to determine what the "log file sync" wait means, so you might do a Google search of the Oracle documentation. Assume that you are using Oracle Database 10.2.0.x - you would then search for:
    {code}
    site:download.oracle.com "log file sync" 102
    {code}
    In my search, the first link was a page from the Oracle Database Performance Tuning Guide:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm
    That page contained the following quote:
    "log file sync
    General area: I/O, over- committing
    Possible cause: Slow disks that store the online logs, Un-batched commits
    Look for: Check the disks that house the online redo logs for resource contention. Check the number of transactions (commits + rollbacks) each second, from V$SYSSTAT."
    Excessive waits for log file sync may also be caused by lack of available CPU time - an overloaded CPU.
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Analytics report for time spent on your portal by any user

    Hi all,
    I am working on 11.1.1.6
    One of my requirement is that I want to display an analytical report on my page which will display the time spent by users on my portal application.
    Like we have OOTB portlet for logins, page trtaffic and all. Is there any OOTB portlet available for the above requirement ?
    If not is there any table in activities schema which will give me this information ?
    Please reply.
    Thanks
    --NavinK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Take a look at WebCenter Analytics.
    Good starting points are:
    http://docs.oracle.com/cd/E21764_01/webcenter.1111/e10148/jpsdg_analytics.htm
    http://docs.oracle.com/cd/E21764_01/webcenter.1111/e10148/jpsdg_app_aschema.htm#JPSDG10757

  • How to sum time values?

    I have a table with a column for duration of activities; boxes contain hours:minutes times such as 0:30, 1:45, 2:20 etc.
    I'd like to be able to sum the column, giving the total time spent on each activity - the three numbers listed should sum to 4:35.
    Advice would be welcome,
    Thanks,
    Mike

    Question asked and responded several times.
    Why not search in the existing threads ?
    In cells of column C the formula is:
    =TIMEVALUE(B)
    In D7 it is:
    =TIME(0, 0, SUM(C3:C6)24*6060)
    CAUTION, a time value can't be greater than 23:59:59 !
    Yvan KOENIG (VALLAURIS, France) mercredi 30 septembre 2009 12:11:08

  • How To Find out Time Spent on a project

    The reason I am asking this question is because I would like to know how long I spent on a project so I can record it for future reference.
    With Sony Vegas you could have the time spent actually showing in the software with some tweaking Iw as wondering if you could do the same in Final Cut Pro.
    Thanks for the help guys

    Not as far as I know.
    I find the program based trackers to be a waste of time. Does this happen to you? You go for a coffee break that turns into lunch that turns into a new project meeting and you left the project open the whole time? If so, whatever time the program says you've been working is hours off.
    Just keep a notebook on the desk to track hours if you like analog or set it up in iCal (or Quicken) and develop the discipline to keep your time.
    Nothing is as simple as making a note on a piece of paper - really.
    x

  • Can somebody give some real time questions for alv report

    hi guru
    can somebody give some real time questions for alv report.
    answers also.
    regards
    subhasis.

    hi,
    The ALV is a set of function modules and classes and their methods which are added to program code. Developers can use the functionality of the ALV in creating new reports,  saving time which might otherwise have been spent on report enhancement
    The common features of report are column    alignment, sorting, filtering, subtotals, totals etc. <b>To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).</b>
    Using ALV, we can have three types of reports:
       1. Simple Report
       2. Block Report
       3. Hierarchical Sequential Report
    <b>Reward useful points</b>
    Siva

  • How to Find Actual Time Spent on a TASK in TFS 2013 by using the scrum template

    Hi! Currently we are using the TFS 2013 version with Scrum template this template contains only Remaining work measure for Task item and there is no
    other option for getting the Actual time spent on particular Task and Bug having the option called Effort. How to find the Actual Time spent or Actual effort hours on particular TASK is it possible? In the similar way the Agile Template having the These options
    like
    1 Original Estimate
    2 Completed Work
    3 Remaining Work 
    Can i use these 3 for Scrum Templete also?
    We require the feature similarly like Atlasian JIRA product (JIRA consist the Actual time, Estimation Time and Log).

    The Scrum template doesn't have these fields, tracking "spent time" is not really in line the philosophy of Scrum. it's tracking data that is not really useful anyway, unless you have to do some form of reporting. In which case you probably already
    have a system to track time in at a higher level. 
    The way TFS tracks time is very hard to use when you have a highly collaborative team, it would require you to create tasks for each person contributing to a task or constant re-asssigning of tasks to track the correct time spent. How else would you track
    two peopleworking together? Pair programming, for example is a practice we at scrum.org highly promote. As well as pairing a tester and a developer up on applying ATDD when working on a story together. When a story is taking "too long" to move off
    the board a technique called swarming is often applied, in which all team members help out to move the story along at a higher pace or to get it unstuck. These ways of workign are very, very, very hard to capture in TFS. But we think the threshold to use these
    techniques should be very low. People should default to these ways of working and not be punished by bad functioning tooling.
    As mentioned by Alexandr, you can extend the Scrum template with the same fields the MSF templates use, but I would not recommend it. Instead, if you need to track time, first consider doing it in different tool and at a different level than task. Maybe
    feature, activity or product backlog item.
    If you still want to track time, then a tool like
    Imaginet Time Sheet can extend TFS in ways that make it a lot easier to track time against any work item.
    As a last resort, consider
    adding the fields from the MSF template, but I beg you to reconsider.
    My blog: blog.jessehouwing.nl

Maybe you are looking for

  • Error while creating PO in operation subcontracting

    I am getting an Error while creating PO in operation subcontracting.When I'm trying to convert the purchase requisition for the operation in the routing into a Purchase order it gives me the error "Not possible to determine any components".Please gui

  • -5408 error on all RTSP streams via QuickTime (after a near-disk failure)

    Hi Folks. Today I had a near catastrophic failure on my startup drive: following a simple permissions repair routine, after a shutdown the startup drive failed to mount. It took DiskWarrior to get it back again, but most of my preference files were c

  • Audio coming from only one field

    Hello, I just did a mic'ed interview with my little camera. I was wearing headphones and noticed audio coming from only the left side, but there was nothing I could do about it that I was aware of. Anyway, now that this thing is in Final Cut Express,

  • Do I need to upgrade from APE 2.0

    I have Adobe Premiere Elements 2.0. My camera is a Sanyo Xacti VPC-HD2000. The file type it uses is MPEG-4 Media File. On the box of APE 2.0 it says these files are compatible however when I add media to APE 2.0 it just shows a geen background to the

  • Git Xorg: libxcb-xlib.so.0: undefined symbol: _xcb_lock_io

    Hi guys, I recently installed latest git xserver-xorg, besides that I had to compile 51 other required dependencies including mesa, libx11, drm etc. One problem is that git libxcb removed libxcb-xlib and made them an inline functions upstream http://