date, select // count per 10 minutes
From: Gerhard <gerhard_ulrike_at_yahoo.de>
Date: Wed, 3 Sep 2008 05:50:17 -0700 (PDT)
Message-ID: <21de0c2c-1e47-4853-b977-9a4181cf6566@d1g2000hsg.googlegroups.com>
Date: Wed, 3 Sep 2008 05:50:17 -0700 (PDT)
Message-ID: <21de0c2c-1e47-4853-b977-9a4181cf6566@d1g2000hsg.googlegroups.com>
for statistics i need to select the number of orders per 10 minutes.
So i want to do something like
SELECT TRUNC(insert_date, '??'), COUNT(*) FROM orders .... ;
But within the trunc-(or other data-based) function allowed Patterns are "HH" or "MI".
as workaround i use:
SELECT TRUNC(insert_date,'HH') +
TRUNC(TO_CHAR(ord_close_dt,'MI'),-1)/(60*24), COUNT(*)
FROM orders .... ;
Is there an easyer way to do the select?
Thanks
Gerhard
Received on Wed Sep 03 2008 - 07:50:17 CDT