Re: THE SQL CHALLENGE!
Date: 4 Sep 1994 16:55:52 GMT
Message-ID: <34cu6o$nhp$2_at_mhadg.inhouse.compuserve.com>
In article <3478u6$lit_at_charm.magnus.acs.ohio-state.edu>,
phart_at_magnus.acs.ohio-state.edu (Patrick S Hart) writes:
> Hi Folks!
> I have been trying, to no avail, to solve the below problem
with only one
> pass at the data. I was curious to know if anyone can solve
this:
> Table Definition:
> StockNumber Product LastInvDate LastInvQty
> -------------------------------------------------------------
> NSN4567 Shoes 08/12/94 1,000
> NSN4567 Shoes 09/01/94 1,500
> NSN2345 Pants 08/23/94 1,200
> NSN2345 Pants 08/05/94 1,500
> I want to select the *last* recorded Inventory for a given
date. So if the
> date given is 09/02/94, the result should look like this:
> NSN4567 Shoes 09/01/94 1,500
> NSN2345 Pants 08/23/94 1,200
Received on Sun Sep 04 1994 - 18:55:52 CEST