By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 913 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

tricky access question using sql

P: n/a
Hi all,

I hope you can help me.
I have a access 2002 database of customers from and they are grouped by
department in this database. Each record has a sale price for a purchase
they made with item number. I need to sort them and select from each group,
the record with the smallest sale price.

How to do in SQL query?

Thanks


Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Danny" <da********@hotmail.com> wrote in message news:<KI*********************@news4.srv.hcvlny.cv. net>...
I have a access 2002 database of customers from and they are grouped by
department in this database. Each record has a sale price for a purchase
they made with item number. I need to sort them and select from each group,
the record with the smallest sale price.

How to do in SQL query?


Can you define "grouped by department?" Do you have a department
table, then an customer table?

It would help if you could post the tables and fields in question.
Otherwise, I can only suggest you look up the MIN() function and the
GROUP BY clause.
Nov 13 '05 #2

P: n/a
"Danny" <da********@hotmail.com> wrote in message news:<KI*********************@news4.srv.hcvlny.cv. net>...
Hi all,

I hope you can help me.
I have a access 2002 database of customers from and they are grouped by
department in this database. Each record has a sale price for a purchase
they made with item number. I need to sort them and select from each group,
the record with the smallest sale price.

How to do in SQL query?

Thanks


use a totals query and MIN(). See help. Sounds a lot like a homework
project and a poorly designed database.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.