Group by specific periods of time - group by 5 seconds

I would like to group records for every 5 seconds
The following query groups for every second
select to_char(state_transition_dt, 'MM/DD HH24:MI:SS'),
UPPER(item_type) Type, UPPER(sync_operation) operation, count(*)
from sync_traffic_flow h
group by to_char(state_transition_dt, 'MM/DD HH24:MI:SS'), UPPER(item_type), UPPER(sync_operation)
order by 1
is there any way to group it for every 5 seconds??
I tried following options:
on executing the following query in timesten database I am getting error
SELECT to_char(sysdate + (10/24/60), 'HH:MI AM') FROM dual;
Error:
Inconsistent dataypes:(DATE,NUMBER) are not compatible in expression (SYSDATE _ 10/24/60) - file "ptDataType.c" ...
Also I am unable to use TRUNC function of oracle database.
Is there any way to group records by specific intervals of time??

Hi,
I am looking for a query where I can get rows grouped by every 5 sec
The following query fetches data for ever second but is there any way to fetch rows grouped by 5 sec
select
     to_char(state_transition_dt, 'MM/DD HH24:MI:SS'),
     UPPER(item_type) Type,
     UPPER(sync_operation) operation,
     count(*)
from
     sync_traffic_flow h
group by
     to_char(state_transition_dt, 'MM/DD HH24:MI:SS'),
     UPPER(item_type),
     UPPER(sync_operation)
order by 1
I tried another query;
instead of grouping records for 5 seconds this query is adding 5 seconds to each record and giving me same information back
any other ways to group rows for every 5 seconds?
select
to_char(state_transition_dt+ numtodsinterval(5, 'SECOND'), 'MM/DD HH24:MI:SS'),
UPPER(item_type) Type,
UPPER(sync_operation) operation,
count(*)
from
sync_traffic_flow h
group by
to_char(state_transition_dt+ numtodsinterval(5, 'SECOND'), 'MM/DD HH24:MI:SS'),
UPPER(item_type),
UPPER(sync_operation)
order by 1
Edited by: user13280764 on 01-Sep-2010 06:53

Similar Messages

  • WCS Lobby Ambassador audit report for a specific period of time

    Hi all,
    I know there is an WCS audit report for each lobby ambassador activities. But the problem is that I see only activities from Nov 9 to the present. I don't know what the reason is, whether somebody erased that information before Nov 9 or something else happened.
    Is there any option to manually configure a specific period of time, for example obtain all activities for last 3 months?
    Thanks for any hint.
    Jozef

    Hi Koti,
    What error did you meet when you used audit report from Oct 16 to Oct 31?
    Please check the log file to find more information about this issue. The path of the log file is: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS. You can check the log file whose modified date is from Oct 16 to Oct 31.
    In addition, please deactivate and reactivate Reporting feature at site collection level.
    A similar post for your reference:
    http://sharepointknowledgebase.blogspot.com/2012/07/unexpected-error-when-trying-to-view.html#.VG2cFouUeog
    About audit log report, please take a look at:
    https://support.office.com/en-us/article/Configure-audit-settings-for-a-site-collection-a9920c97-38c0-44f2-8bcb-4cf1e2ae22d2?ui=en-US&rs=en-US&ad=US
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to search for value records for a specific period of time?

    Hi,
    I am building an application where I need to use BDB to store tons of call records.
    In the call records, I have the following fields:
    1. from-caller
    2. to-caller
    3. begin-time
    4. end-time
    5. account-code
    6. user-code
    I want to use end-time's microsecond representation to serve as the Key.
    So, how can I do the following data lookup?
    1. Search for all Value records between 2009-10-11 to now()
    2. Search for all Value records between 2009-10-11 to now() with account-code = 100
    3. Search for all Value records between 2009-10-11 to now() with account-code = 100 and user-code=10
    Is there any similar examples out there that I can refer to?
    Thanks,
    JB

    Hi,
    Btw, my operation is mostly:
    1. Append call records
    2. Search call records
    3. Remove ending records that are older than XX days
    Please kindly advise on how I should best structure the data to meet this purpose.
    Thanks,
    JB

  • How to make a loop run for specific period of time ?

    hello !
    i'm new to labview and could'nt found how to make a loop run for 2 sec for example, and then to exit.
    Solved!
    Go to Solution.

    Hi Hookso,
    You can do it using the different loops like While loop and For Loop. Roderic has already stated how to do it using a for loop. I have illustrated in the attached vi how to do it using a while loop and Elapsed Time function. Take a look.
    Regards,
    Nitzz
    (Give kudos to good Answers and Mark it as a Solution if your problem is Solved) 
    Attachments:
    Untitled 2.vi ‏36 KB

  • Lock and Unlock user for a period of time

    I need to lock a specific su01 user for a specific period of time each day.  Does anyone have any idea how to accomplish this task?

    Hi Lye and Elvira,
    I am not logged on, but fairly certain that calling FM BAPI_USER_GET_DETAIL will also deliver the lock status / reason and user existence check etc, which means that the program can react appropriately to the UFLAG lock and the reason for it (if coded to do so). It would also spare the select on USR02 which might change or even be blocked.
    A bigger problem I see with preventing a user from doing something from a certain point in time onwards using this lock-approach, is that the user might already be logged on!
    @ Elvira Knight and ELVIRA KNIGHT regarding points: You have 2 SDN ID's now. You need to logon as the ID which created the thread (Elvira Knight originally asked the question) either by using the P- or S-number from the registration or the email address (you might need to temporarily change ELVIRA KNIGHT's email address to do that). Then you will be able to assign points for the thread which you started as Elvira Knight.
    Theoretically I could add the points for you, but I prefer not to interfer in the decisions and points of SDN members (it is a free world  - unless there is points collaboration...). The future of the points-system is indeed also hanging in a bit of a balance because of that reason. You can email me via the address in my business card if you need some help.
    Cheers,
    Julius

  • Oracle HR 11.5.7 -Select DateTracked Info of Employees for Specific Period

    Oracle HR 11.5.7 -Select DateTracked Info of Employees for Specific Period (From/To)
    Hi,
    We have Oracle Human Resources 11.5.7 and I would like to know which is the best way to use when need to query data for employees valid within a specific period (From/To) or at specific date.
    For example:
    Say Current Date= 25-OCT-05
    1.
    If I want to query the number of employees booked for a training event occurred as at 01-AUG-05 and one of the employees booked left as at 30-SEP-05, I would like to be included in the query.
    or 2.
    If I want to see the employees assignment details for a specific period to see the active(latest) assignment details as at that period.
    I would appreciate any feedback regarding the best way to do such queries as far as accuracy of data and performance is concerned.
    Thanking you in advance.
    Best regards,
    Elena

    Thank you for your reply..:)
    Actually I'm already using this..
    My problem is when I need to retrieve information for a specific period of time.
    For example say I want to retrieve all sickness absences for Year 2004 and want to retrieve the last employee details (people & assignment tables) that fall within this period (either with an effective date >= sysdate (ie. still active) or which was current upto 31-dec-2004 and might changed later on).
    To be more specific let's say an employee took sick leave in 2004 for total 10 days and has the following rows in per_people_f and per_assignments_f:
    per_people_f:
    start_date end_date person_id other personal details
    01-FEB-2001 - 15-MAR-2004 3808 xxxx
    16-MAR-2004 - 30-JUN-2004 3808 yyyy
    01-JUL-2004 - 17-FEB-2005 3808 zzzz
    18-FEB-2005 TO DATE 3808 www
    per_assignments_f:
    start_date end_date person_id assign_id other assignment details
    01-FEB-2001 - 15-JAN-2003 3808 1114 aaaa
    16-JAN-2003 - 30-AUG-2004 3808 1114 bbbb
    31-AUG-2004 - TO DATE 3808 1114 cccc
    What I need the query to return for the above example is:
    per_people_f:
    start_date end_date person_id other personal details
    01-JUL-2004 - 17-FEB-2005 3808 zzzz
    and
    per_assignments_f:
    start_date end_date person_id assign_id other assignment details
    31-AUG-2004 - TO DATE 3808 1114 cccc
    and sickness days =10
    (sum of duration where
    absence start_date >= 01-JAN-2004
    AND end_date<=31-DEC-2004)
    Thanking you in advance for any help on this issue.
    Regards,
    Elena

  • Inactive Item report to show Item bought within a specific period and not sold within a specific period by whse and have stock

    Hi
    I'm trying to come up with query report to show Inactive Item bought within a specific period and not sold within a specific period by whse and have stock
    The report should show  Item Number, Item Name ,Item cost,Retail Price [Based on a price list], Qty in Whse, Last Purchase Date, Last sale Date etc.
    e.g item bought between 2011-2013 and have not been sold with the same date range or the last 12 months.
    Regards
    Brian Ndunda.

    Hi,
    Try this query:
    SELECT T0.[ItemCode], T0.[ItemName], T0.[OnHand], T0.[AvgPrice], T0.[LastPurPrc], T0.[LstSalDate] FROM OITM T0  left JOIN INV1 T1 ON T0.ItemCode = T1.ItemCode left JOIN OINV T2 ON T1.DocEntry = T2.DocEntry WHERE T1.[Quantity] is null and  T0.[OnHand] >0 GROUP BY T0.[ItemCode], T0.[ItemName], T0.[OnHand], T0.[AvgPrice], T0.[LastPurPrc], T0.[LstSalDate]
    Thanks & Regards,
    Nagarajan

  • User login report in Active Directory for specific date and time

    I want to get User login report in Active Directory for specific date and time e.g user logged in at15-01-2015 from 8:00am to 4:00pm
    Is any query, script or any tool available?
    Waiting for reply please

    You can identify the last logon date and time using my script here: https://gallery.technet.microsoft.com/scriptcenter/Get-Active-Directory-User-bbcdd771
    If you would like to get back in time and see when the user did a logon / logoff then you need to have auditing enabled. Once done, you can records from Security log in the event viewer: https://social.technet.microsoft.com/Forums/windowsserver/en-US/98cbecb0-d23d-479d-aa65-07e3e214e2c7/manage-active-directory-users-logon-logoff-events
    I have started a Wiki about how to track logon / logoff and it can help too: http://social.technet.microsoft.com/wiki/contents/articles/20422.record-logon-logoff-activities-on-domain-servers-and-workstations-using-group-policy.aspx
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • TS3988 synchronizing in specific period

    My email is not synchronizing in a specific period from May 2012 till day before yesterday. From yesterday the new email and mail before May 2012 is synchronizing well. I have tried to delete my icloud account and than loaded again. Same problem is occured. On the icloud server my latest emails are still there.
    Who can advice or help me, Simon

    Hi karthik..
    here you are.
    SELECT   br.resources, rmst.resource_desc, b.cost_cmpntcls_code,
    *(AVG (gmf_cmcommon.get_rsrc_cost (br.resources,*
    bh.organization_id,
    bvd.consume_layer_date,
    *1000,*
    *0*
    *) avg_resource_cost,*
    SUM (bvd.consume_ib_pri_qty) hrs,
    *( (SUM (bvd.consume_ib_pri_qty))*
    ** (AVG (gmf_cmcommon.get_rsrc_cost (br.resources,*
    bh.organization_id,
    bvd.consume_layer_date,
    *1000,*
    *0*
    *) AS rsc_value*
    FROM gmf_batch_vib_details bvd,
    gmf_batch_requirements br,
    gme_batch_header_vw bh,
    cr_rsrc_mst_vl rmst,
    cm_cmpt_mst_b b
    WHERE rmst.cost_cmpntcls_id = b.cost_cmpntcls_id
    AND bh.organization_id = :p_org_id
    AND br.resources BETWEEN NVL (:p_resources_lo, br.resources)
    AND NVL (:p_resources_hi, br.resources)
    AND br.batch_id = bh.batch_id
    AND br.resources IS NOT NULL
    AND br.ingredient_item_id IS NULL
    AND bvd.requirement_id = br.requirement_id
    AND bvd.line_type = 0
    AND rmst.resources = br.resources
    AND b.cost_cmpntcls_code BETWEEN NVL (:p_cmpntcls_lo,
    b.cost_cmpntcls_code
    AND NVL (:p_cmpntcls_hi,
    b.cost_cmpntcls_code
    AND (   rmst.resource_class >=
    NVL (:p_resource_class_low, rmst.resource_class)
    OR (rmst.resource_class IS NULL AND :p_resource_class_low IS NULL)
    AND (   rmst.resource_class <=
    NVL (:p_resource_class_hi, rmst.resource_class)
    OR (rmst.resource_class IS NULL AND :p_resource_class_hi IS NULL)
    GROUP BY b.cost_cmpntcls_code, br.resources, rmst.resource_desc
    waiting for your suggestions .
    Edited by: Ahmed.Abbas on Jul 12, 2011 6:30 AM

  • Resources Value In specific period

    Hi,
    Is there any way to get the total resources values in specific period?
    I want to know for each resource...
    1- How many hours it made in this period.
    2-the total value for this resource...
    Grouped by the cost component class IE: (Labor , Machine ) ...
    Waiting for your ideas and any thing that may helps.
    Thanks in advance.

    Hi karthik..
    here you are.
    SELECT   br.resources, rmst.resource_desc, b.cost_cmpntcls_code,
    *(AVG (gmf_cmcommon.get_rsrc_cost (br.resources,*
    bh.organization_id,
    bvd.consume_layer_date,
    *1000,*
    *0*
    *) avg_resource_cost,*
    SUM (bvd.consume_ib_pri_qty) hrs,
    *( (SUM (bvd.consume_ib_pri_qty))*
    ** (AVG (gmf_cmcommon.get_rsrc_cost (br.resources,*
    bh.organization_id,
    bvd.consume_layer_date,
    *1000,*
    *0*
    *) AS rsc_value*
    FROM gmf_batch_vib_details bvd,
    gmf_batch_requirements br,
    gme_batch_header_vw bh,
    cr_rsrc_mst_vl rmst,
    cm_cmpt_mst_b b
    WHERE rmst.cost_cmpntcls_id = b.cost_cmpntcls_id
    AND bh.organization_id = :p_org_id
    AND br.resources BETWEEN NVL (:p_resources_lo, br.resources)
    AND NVL (:p_resources_hi, br.resources)
    AND br.batch_id = bh.batch_id
    AND br.resources IS NOT NULL
    AND br.ingredient_item_id IS NULL
    AND bvd.requirement_id = br.requirement_id
    AND bvd.line_type = 0
    AND rmst.resources = br.resources
    AND b.cost_cmpntcls_code BETWEEN NVL (:p_cmpntcls_lo,
    b.cost_cmpntcls_code
    AND NVL (:p_cmpntcls_hi,
    b.cost_cmpntcls_code
    AND (   rmst.resource_class >=
    NVL (:p_resource_class_low, rmst.resource_class)
    OR (rmst.resource_class IS NULL AND :p_resource_class_low IS NULL)
    AND (   rmst.resource_class <=
    NVL (:p_resource_class_hi, rmst.resource_class)
    OR (rmst.resource_class IS NULL AND :p_resource_class_hi IS NULL)
    GROUP BY b.cost_cmpntcls_code, br.resources, rmst.resource_desc
    waiting for your suggestions .
    Edited by: Ahmed.Abbas on Jul 12, 2011 6:30 AM

  • Unable to access shared files over network after period of time.

    First off, I don't think that this issue is related to our router, but I have been searching for a fix and can not find one. We have a WRT54GS. Now, on to our issue:
    At my work, we have a small network with computers sharing files between the others. I have attached a network diagram to help explain this better.
    Our Win7 machine is our main computer that shares an external hard drive with much information that the other computers need to access. What we have noticed is either after a sleep, or even a period of time of say, 2 hours, those files are no longer able to be accessed. The Win7 machine is still sharing them, but the WinXP machines are unable to access them anymore and my Mac can see the computer is unable to connect to the folders. I have gone and attempted to get some help over at Microsofts site but that was a fail. Here is the link to the forum post there. http://social.answers.microsoft.com/Forums/en-US/w7network/thread/f0a2e8d6-f75a-41d7-a280-c6f3adbffa...
    A member there gave me this:
    The Network connection is probably not resuming after sleep. 
    First try this, http://www.ezlan.net/Win7/power_save_win7.jpg
    It is in the Network Connection Properties under the Network card configuration.
    If it already checked this way, or does not work after checking, the Network card has to be taken out of the computer's Power Saving loop, and stay on all the time.
    Otherwise, Updating the Card with the latest OEM drivers (downloaded from the computer's support site) might help too.
    On a rare occasions, some cards might be "Quirky" in this regards and need to be replaced.
    --I would like to add that this DOESN'T ONLY happen after sleep, it also happens after a time of being used.
    I attempted those and no luck. This problem is still occurring and the only way we can fix it is by restarting the Win7 machine. But even if it is being used, we have no idea when those files are unable to be accessed.
    *I will add that the Win7 machine is still able to access the other computers when this problem occurs if that helps.
    **The Win7 machine is a Dell T3500 running Windows 7 64bit. I can provide specific hardware if needed. The drivers are all up to date as of yesterday.
    ***So upon looking in the Windows XP machine, both of the folders from the Win7 machine disappear once this problem occurs in the My Network Places folder. And one folder is on the internal drive, one is on external. The computers are in this situation now where I am unable to access them. The Win7 machine can read and write from the other computers, but the other computers can even see the Win7 Machine.
    ****All the connections are wired and are not using the wireless.
    Thanks for any help that anyone may have for me!
    Steve
    Network Map > http://scubasblog.com/network.jpg
    Dell Support Forum with same issue I posted >> http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/p/19337620/19716797.asp...

    It sounds like there is incompatibility issue with XP and Win7. To isolate this, do you have another Win7 machine? Try to add it to the network and check if the shared drives are accessible after sleep. If you don't have another computer, try virtual machine and create a Win7 system.
    Update your LAN card driver from the manufacturer's site. Don't use the driver from windows update.
    Lastly, does this happen to your XP machines? Like, one of the XP machine sharing a folder and falls asleep. When it wakes up, does Win7 machine can still access the shared folder?

  • Mail stops receiving messages after a period of time

    Every since installing Mavericks my Mail app stops receiving messages after a period of time. I know because I get the email on my phone, but I try to grab them in Mail and nothing. If I restart Mail then they come through.
    I'm using Gmail as my email provider. Is anyone else suffering with this? Is there a work around?

    Workaround or not, this is an annoyance, and that's a nice way of putting it. Coming from Mountain Lion, when Mail was working flawlessly, having to deal with this issue is just plain ridiculous. What happened to the Mail application? I don't understand how Apple could screw this up to badly.
    Every time I restart or reset the connection to the servers, the Mail app is downloading thousands of messages (I can see the display on the bottom-left). I have no idea what it's doing or why, for that matter. If Apple doesn't fix this soon, I will seriously be forced to look for an alternative, which saddens me greatly. I really like Mail, but if it cannot reliably get my mail simply because I've left it open too long, or hidden it behind another window, I will stop using it.
    What's worse is that I've had similar issues with other applications like iPhoto and iTunes. Whatever is happening to Mail is probably not just application-specific. It's probably OS-specific. I hope Apple is working on it and that we will see a major update to Mavericks soon. All I know is that, right now, I'm seriously regretting upgrading to Mavericks.

  • CM 2012 System Discovery " Only discover computers that have logged onto Domain in given period of time"

    Hello,
     CM 2012 now has a options " Only discover computers that have logged onto Domain in given period of time". Which Active directory property it looks into. is it looking into lastpwset or some other properties. Please let me know the details of
    this option, specifically what properties it looks into to find out the information.
    Thank you

    That would be the LastLogonTimeStamp Attribute for the computer account.
    http://blogs.technet.com/b/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • Re: Retention Period, Residence time and Archiving Cycle

    Hello Experts,
    1.Could someone help me where we maintain the retention period, residence time and archiving cycle for an archiving object.
    2.How to schedule a background job for  archiving???
    Regards
    RR

    Hello RR,
    Residence period: Most of the archiving object residence period is maintained in customizing > Application specific customizing in Archive development tool access through transaction SARA.
    Note: There are some archiving object for which you can't maintain residence period however these archiving object residence period should be manually controlled in write variant.
    Retention Period: This retention period is mentioned in archive server.
    Total retention time = Online Residence period + Offline Retention period.
    2. You can schedule archiving jobs by SARA transaction. This transaction will help in scheduling the job background. Or By using Background user id, one can schedule the archiving jobs by background.
    -Thanks,
    Ajay

  • No of RFC connections for a period of time

    Dear all,
    Is there any possibility to find the number of RFC connections hit to a server  over a certain period of time?
    I could not find any more details using AL08 since it gives the cumulative users rather than specific user type.
    Regards,
    Kumar
    Edited by: Anees Qureshy on Jun 16, 2010 1:43 PM

    Ya i have checked under that location.
    But It will give the total no of calls that have been made.So if we assume 20 calls made,then im sure it does not imply that 20 connections have been made.
    We have enabled a max of 2000 connections at any time.
    But the number it is showing is in lakhs..I guess that is no of cumulative rfc calls made.
    I still wait for a suitable reply.

Maybe you are looking for