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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:56:29+00:00 2026-06-13T10:56:29+00:00

Select * FROM table WHERE a<=9 AND a>=4 AND b<=20 AND b>=16 AND c<=30

  • 0
Select * FROM table WHERE a<=9 AND a>=4 AND b<=20 AND b>=16 AND c<=30 AND c>=26

Now I want to end up selecting from query 1 the results in which at least two of the following criteria are met.

Select * FROM table WHERE a<=7 AND a>=5 AND B<=19 AND B>=17 AND C<=29 AND c>=27

Numbers could be anything, although on query 2 these are lower for the less than eqaul and higher for the bigger than equal.

I want to be able to set the number of minimum coincidences to be met at query 2 with a number.
For example 5 coincidences must be met at query 2 to end up making a selection in query 1.

This is about range and matches count, if there is an easier way to achieve this great.

  • 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-13T10:56:30+00:00Added an answer on June 13, 2026 at 10:56 am

    i think this kind of query will do your job

    Select 
    *,
    (IF(a<=7 AND a>=5,1,0) + IF(B<=19 AND B>=17,1,0) + IF(C<=29 AND c>=27,1,0))
    as totalmatch
    FROM table
    HAVING totalmatch >=2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I perform SELECT * FROM table I got results like below: 1 item1
My select statement in PHP is select * from table; I use the following
i have this sql query select * from table where name like ? but
I like to reverse this query: SELECT * FROM table WHERE status IN (
I have the following query: SELECT * FROM table_name WHERE (col_1 LIKE '%$keyword%' OR
I have several hosts from which i want to do the same query. So
I've an existing stored procedure SP1 which is simple select from a table. It's
i want to create a table and append NOW() to the end of the
I have created one MVC3 application. In which I'm selecting two Ids from two
SELECT * FROM [Table] WHERE (Izdava NOT LIKE NULL) // how to check if

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.