Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8115415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:28:43+00:00 2026-06-06T03:28:43+00:00

This may be an extremely easy question but I can’t get my head around

  • 0

This may be an extremely easy question but I can’t get my head around how to solve it in MS Access. It has probably been answered before but I haven’t been able to find it.

I have a table with 3 columns: col1 is an object ID, col2 and col3 are measurements. I’ve built a query so that for each object we get the corresponding minimum value in col2. This works OK with a simple group-by query. The problem is when I try to pull col3 (associated with the row where minimum value was found), it will no longer group-by properly.

I’ve been playing with the group-by clause and tried to divide into several queries but so far no luck.

Here’s an example of what I have (left) and would like to get (right):

col1  col2  col3   --->   col1  minC2 col3 
----  ----  ----          ----  ----  ----
1     0     1.8           1     0     1.8   
1     1     1.4           2     2     2.5
2     4     1.1           3     1     7.6
2     6     4.7
2     2     2.5
3     4     3.3
3     1     7.6

I hope this makes sense. Any help/MS Access SQL syntax is appreciated…
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:28:44+00:00Added an answer on June 6, 2026 at 3:28 am

    Assuming that the second line of what you like to get is [2 2 2.5], this is what you’re looking for:

    select a.col1, a.colm, m.col3
    from
        (
            select col1, min(col2) as colm
            from test
            group by col1
        ) as a
    inner join test m on a.col1 = m.col1 and a.colm = m.col2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this may sound like an extremely dumb question, but I cannot find the TextField
This may seem like a simple question but i am getting an error when
This may seem like a stupid question, but what message do i send to
This may sound like a stupid question, perhaps it is. But I'm only trying
This question may be extremely naive, in which case, I apologize. I'm trying to
This may be a very simple question, but I haven't found an answer to
I know this may sound extremely nooby, so sorry in advance but I am
This question may seem extremely noob-ish, I apologize. I've been periodically attempting for the
This may sound extremely dim, but where exactly do I place a stored procedure
This may be rather noobish but I'm gonna ask anyhow. I have a class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.