DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: SQL - count for last n min

Hybrid View

  1. #1
    Join Date
    Nov 2002
    Posts
    31

    Red face SQL - count for last n min

    what is the easiest way of getting count of rows from a table for record added in past 5 min.

    Table - Sales
    order_num
    dt_created


    thanks
    --gc

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    select count(order_num) from sales
    where dt_created >= sysdate-(5/(60*24))
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

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


Click Here to Expand Forum to Full Width