Totals Query

D

DustinS

I have a table called "Quotes"

In it I have records that may have the same "Project Name"

Example

"Quote1" "Project A" "CustomerZ"
"Quote2" "Project A" "CustomerY"
"Quote3" "Project A" "CustomerX"


In my query I only want to show the first instance of "Project A" not all 3

Shouldn't I be able to simply do a totals query select FIRST for Project
Name and GROUP BY for the rest?

Or am I missing something?

Thanks!
 
M

MGFoster

Don't use First() & Last(), they really don't seem to work as expected.
Usually, Min() and Max() will do.

What do you mean by "first instance"? What are you basing that "first"
on, time, quote number, highest quote?
 
D

DustinS

I don't have a preference which instance is the "first" I just want to show
1 instance of "Project A" the MIN of dollar amount for the three instances,
and a COUNT of how many instances there are.
 
D

DustinS

Since the Value that I applied the FIRST criteria to is a text value I
figured that Access would determine its own criteria for what it considered
to be the first record.
 
G

Guest

Do not include the Customer field... use Project with Group by... Project
again to count... and Quote Amount with Min. This will list each Project
with the minimum quote and how many quotes you had, but not who gave the
quote, which i assume is what you were trying to do.
To do that... once you have created and saved the above query, create
another query including the original table and the minimum quote query.
Create a join from MinOfQuote in the query to the original Quote field.
Choose the customer and quote fields from the original table and
CountOfProject from the query and you should have the data you wanted.
Good Luck!
 

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