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 7760295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:50:58+00:00 2026-06-01T13:50:58+00:00

Searching for a while now, but haven’t found a suitable answer to my problem.

  • 0

Searching for a while now, but haven’t found a suitable answer to my problem.

Explanation:

ID | Year |  Factor1 | Number1 | Number2
1  | 2010 |   213    |    1     |   1     
2  | 2010 |   213    |    1     |   2    
3  | 2010 |   214    |    2     |   1    
4  | 2010 |   214    |    2     |   2    
6  | 2010 |   210    |    3     |   1    
7  | 2010 |   210    |    3     |   2   
8  | 2011 |   250    |    3     |   5 
5  | 2012 |   214    |    2     |   4    

EDIT:
Forgot Something, corrected that in the above table.
I need 2 combinations: year and factor1 only once, then min(number1) and last min(number2).
For example above I would need IDs 1,3,5,6,8 (sorry they are mixed for better readability of the other values).

Anyone any idea how to realize that?

  • 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-01T13:51:00+00:00Added an answer on June 1, 2026 at 1:51 pm

    Got the code now from another forum, works fine for me:

    SELECT 
      tab.*
    FROM
      t33 tab
      INNER JOIN (
        SELECT
          m1.y,
          m1.factor1,
          m1.min_1,
          m2.min_2
        FROM
          (
            SELECT
              y,
              factor1,
              MIN(number1) AS min_1
            FROM
              t33 tab
            GROUP BY
              y,
              factor1
          ) m1
          INNER JOIN (
            SELECT 
                  y,
                  factor1,
                  number1,
                  MIN(number2) AS min_2
                FROM 
                  t33
                GROUP BY
                  y,
                  factor1,
                  number1
            ) m2
          ON m1.y = m2.y
          AND m1.factor1 = m2.factor1
          AND m1.min_1 = m2.number1
        ) sel
          ON tab.y = sel.y
          AND tab.factor1 = sel.factor1
          AND tab.number1 = sel.min_1
          AND tab.number2 = sel.min_2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i been searching the internet for few days now but haven't found good approach
I've searching for this for a while now online (Google, and StackOverflow), but haven't
I'm searching now for a while but can't find an entrance… The application should
I have been searching for quite a while now but i am unable to
I've been searching for a while now, but I can't seem to figure out
I've been searching on this for a while now, but I can't find anything
I've been struggling with this problem for a while now, searching every possible solution.
I've been searching for while now and I can't find a simple example of
While searching a bug in my code today I found a strange thing. When
I'm searching a while for this and I can't found something that works for

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.