Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: a simple SELECT ?

Re: a simple SELECT ?

From: Sanjaya Ganesh <sganesh_at_apple.com>
Date: 22 May 1999 11:03:36 -0500
Message-ID: <3746c748@discussions>

Wow! Let me try it !

select * from deliveries
where date > (select a.date from

	deliveries a
	where 9 = (select count(*) from deliveries b
				where b.id = <id>
				and  b.quantity = <qty>
				and b.id = a.id and b.qty = a.qty
				and  b.date > a.date)
	and a.id = <id> and a.qty = <qty>);


Something like this with a slightly modified where clause as per your input way.

Sanjay
sganesh_at_apple.com

"ACT_at_BLUEGATE" <act_at_bluegate.be> wrote:
>It seems simple...>
>I've a deliveries table with three columns: date, customer id, and quantity.
>
>How can i retrieve in a query the last (in time) 10 deliveries for a
>specified customer ?
>
>Achille Carette, Bluegate
>act_at_bluegate.be
>
>
Received on Sat May 22 1999 - 11:03:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US