Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006
    Posts
    1

    Unanswered: group by timestamp intervals

    so i run this query:

    select trunc(audit_timestamp,'MI'), count(audit_timestamp) from aud.audit_service where source_application = 'GIS'
    group by trunc(audit_timestamp,'MI')
    order by trunc(audit_timestamp,'MI')

    which runs fine, tells me the amount of transactions per minute, though my question is if it's possible to do the same thing but in stead of per minute, have it per 10 minute interval (for the 6 intervals in an hour)?
    Thanks!

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Try this:

    trunc(audit_timestamp,'HH24')+floor(to_number(to_c har(dt,'MI'))/10)*10/(24*60)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •