473,326 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

tricky access question using sql

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
2 1287
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ryan | last post by:
I have a problem with record locking / blocking within an application. The app is quite straight forward. Written in Delphi 5 using BDE to access a SQL 7 database (Win2K server). Every so often...
2
by: Kennedy_f | last post by:
Most questions of exam 70-228 have a selection of answers that all seem correct, but in reality, the right answer is the one that best solves the question.There a few trick questions like how to...
5
by: PC Work | last post by:
I am using code to export a database to a text file in ms access 2002 Not matter what export method I choose, a field name with a # in it exports to a period. so a field name caled '# of items'...
6
by: ccwork | last post by:
p = p->next = q; Why it is undefined? operator "=" is right-associative i.e. "p = p->next = q;" is equivalent to "p = (p->next = q); And I think another interpretation of sequence point is:...
8
by: pras.vaidya | last post by:
Hi , below given question was asked to me during an interview and i figured it out little tricky . It would be a great help if anyone could solve it. Code : - main() { char...
7
by: VB Programmer | last post by:
I am using the BitBlt operation to capture various controls into jpegs. It's almost like a screen capture, but of just the control. (This is a VB.NET application.) Because of BitBlt limitations...
4
by: Puthisu | last post by:
Have a MS Access db with queries and tables. There are SQL Pass-thru queries which is used to get data from the production SQL Server db. The local access tables are populated using these pass-thru...
8
by: VB Programmer | last post by:
I would appreciate your assistance on this ASP.NET 2.0 site.... This is the wierd problem: While accessing the built in .NET functions for 'profiling' or 'membership' an error is generated (see...
1
by: MorrganMail | last post by:
Or at least I find it tricky. :-) Assume we have three tables A, B and C. Table A contains a path and the distance for traveling that path: A (PathId, NodeId, Dist (from previous node)) 1, 1,...
2
by: fleece | last post by:
Hi, I need help on this tricky access permission issue: For my database, I want to allow users be able to edit his/her records, insert new ones and review other user's records but no edit. How to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.