I don't use Left Outer Joins very often, so I would like to ask the list.

 

I would like to perform (I think) a left outer join of a table named Bids
obtaining the total number of rows and the maximum bid amount per auction
item for the following SQL

 

SELECT a1.AuctionID, a1.AuctionTitle, a1.AuctionBuyNowPrice,
(a1.AuctionStartTimeSecs + (a1.AuctionDuration * 86400) - 1250113858) as
RemainingTime FROM auction a1, categoryauction c2 WHERE (
((a1.AuctionStartTimeStamp + (a1.AuctionDuration * 86400) - 1250113858) >
'0') AND (a1.AuctionStatus = '0') AND (c2.AuctionID=a1.AuctionID) AND
(c2.Cat_ID=6) ) ORDER BY RemainingTime ASC, a1.AuctionID ASC

 

The table named Bid has the following pertinent columns

BidID

AuctionID

BidAmount

 

There may not be any bids on some of the auction items, so I believe a left
outer join is needed. Can I do this left outer join even though there is a
third table "categoryauction" included in the SQL?

 

If so, can I obtain the columns already listed including the count of the
numbers of bid rows per auction item and the maximum bid per auction item as
well?

 

Help with the structure of the SQL would be appreciated.

 

Thanks

 

Steve Fogelson

Internet Commerce Solutions

Reply via email to