pull other fields from Totals query

B

BLTibbs

I have a query that has up to 6 competitors per Item. Each item has to find
the lowest priced competitor for analysis. I have created a query that
groups by the item ID#, then chooses the 'Min' price and that is working just
right to find the lowest competitor. however, I need to pull a few more
fields from that query in order to get all of the information I want. Is
there some way to flag that 'Min' record somehow so I can later use the other
fields in that table?
 
K

KARL DEWEY

Two ways to do it. One is to use two queries - the second query uses the
table and the first query joined.

The second is to use a subquery. Search the newsgroup for information on
subqueries.
 
B

BLTibbs

Karl (or anyone else):

I am just lost when you talk about subqueries and the newsgroups don't seem
to have the same issue I have and my inexperience is getting me bogged down.
Here is the query from he sql pane that pulls up just the lowest priced of
each competitor. How do I insert another row from this "lowest priced"
record called [condition] into a table called "BookTbl" when the two can be
matched to a field called [ISBN]? I tried to join the table and query, but
couldn't get a one to many relationship - what am I missing there?

SELECT TempCompetitorTbl.ISBN, Min(TempCompetitorTbl.SellerPrice) AS
MinOfSellerPrice, Count(TempCompetitorTbl.KeyID) AS CountOfKeyID
FROM TempCompetitorTbl
GROUP BY TempCompetitorTbl.ISBN, TempCompetitorTbl.SellerCondition
HAVING (((TempCompetitorTbl.SellerCondition) Like "used"));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top