X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0FD17D1B507 for ; Wed, 21 Apr 2004 04:16:32 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 27980-02 for ; Wed, 21 Apr 2004 04:16:31 -0300 (ADT) Received: from cyber12.e-insites.com (ns10.nic-reg-dns.com [66.206.10.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6398DD1D26C for ; Wed, 21 Apr 2004 04:16:29 -0300 (ADT) Received: from server2k ([61.11.69.26]) by cyber12.e-insites.com with MailEnable ESMTP; Wed, 21 Apr 2004 00:16:27 -0700 Received: from 192.168.50.51 by server2k ([192.168.50.102] running VPOP3) with SMTP for ; Wed, 21 Apr 2004 12:54:49 +0530 X-MSReally-From: sqllist@coralindia.com Message-ID: <003601c4276f$ecac8980$3332a8c0@DENIS> From: "Denis P Gohel" To: Subject: Re: staggered query? Date: Wed, 21 Apr 2004 12:41:53 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Server: VPOP3 V1.5.0 - Registered X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200404/199 X-Sequence-Number: 17574 Hi Try this.. SELECT Col1 , Col2 FROM yourtable WHERE to_number(to_char(col1, 'SS'),'99') / 10 ) in (10,20,30,40,50,00); HTH Denis > ----- Original Message ----- > From: Vincent Ladlad > To: > Sent: Wednesday, April 21, 2004 8:23 AM > Subject: [SQL] staggered query? > > > > hi! im new to SQL, and i need to find a solution > > to this problem: > > > > i have a table with two columns, the first column > > is of type timestamp. > > > > the table contains hundreds of thousands of records. > > i need to get all the entries/records at every 10 seconds > > interval. example, given a table: > > > > hh/mm/ss | data > > --------------- > > 00:00:00 1 > > 00:00:01 2 > > 00:00:02 3 > > 00:00:03 4 > > 00:00:04 5 > > 00:00:05 6 > > 00:00:06 7 > > 00:00:07 8 > > .. > > .. > > > > my query should return: > > 00:00:10 > > 00:00:20 > > 00:00:30 > > (etc) > > > > is this possible? if yes, how do i do it? > > > > thanks! > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.484 / Virus Database: 282 - Release Date: 5/27/2003 > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 4: Don't 'kill -9' the postmaster > >