Min Query

F

Fishman25

Hi There,

I have three tables: Lines, and Destinations. The Lines table contains an
ObjectID (unique identifier), OriginID, Destination ID, TotalLength, and
TotalTime fields. The Lines table has a one-to-one relationship to the
Destinations table via the Destination ID field. The Destination table has
the previously-mentioned Destination ID field, and a LakeID field (roughly
200 DestinationID's for each Lake value).

I am trying to design a query whereby I return the MINIMUM TotalTime for
each OriginID and LakeID field. To construct the query, I have pulled
TotalTime (Min), OriginID, and LakeID from the drop-down query menus.
Although the query works successfully at choosing each minimum TotalTime
value for each OriginID - LakeID pair, I also want to know which Object ID
the minimumTotalTime values correspond to. However, when I include ObjectID
in my query, the results include ALL objectID's and not just the minimum
values from the query that I have run. Any thoughts? I suspect the problem
is contained within my relationships and/or primary keys but I am unsure how
to fix them
 

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