We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Technology

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What Is a Range Query?

Kristie Lorette
By
Updated: Jan 28, 2024
Views: 5,960
Share

Range query is a term used in database management that describes the lower and upper limits for conducting a search of the information the database contains. In fact, a range query is a common practice for the use of a database that contains information for a business, organization or other informational purpose.

For example, a doctor’s office may have a computer database system for its patient files. In a case where the doctor’s office wants to send a postcard in the mail to patients that are due for an annual check-up, the database administrator would use a range query to identify the records that fall within the criteria. The lower range may be patients that were last in the office on 25 May of the year before last. The upper range would be patients that were last in the office on 25 May of the previous year.

A range query does not always have to pertain to dates. The range variable can vary from search to search. What all of the searches have in common, however, is that the database administrator or person using the database to find the information, does not know how many records or files fall within the range.

For example, a company that sells widgets may track the amount of each purchase for each client record in its database. So, when Susie Q makes a purchase of $4,000 US Dollars (USD) in January, $2,000 USD in March, $3,500 USD in June and another $4,000 USD in October, all of these purchase amounts are recorded in Susie Q’s record in the database. If the company wants to launch a marketing campaign to reward loyal customers, they may use a range query to search the database for customers that have purchased more than $12,000 USD of widgets from them in the past year.

For this query, they would enter $12,000 in the lower end of the range query and $12,001+ in the upper range field of the search. An additional variable would be the date range of one year. The results returned would include Susie Q’s record.

Another instance where a range query would come in handy is if the company is searching for customers that ordered at least four times in a one year period. The range query on the order amounts would have a lower end of 4 and an upper end of 5+. Another variable would be the dates so a range query of a one year period would be entered into the search criteria of the database.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Kristie Lorette
By Kristie Lorette
Kristie Lorette, a storyteller, copywriter, and content creator, helps businesses connect with their ideal audiences through compelling narratives. With an advanced degree and extensive experience, she crafts engaging long and short-form content that drives results across various platforms. Her ability to understand and connect with target audiences makes her a valuable asset to any content creation team.

Editors' Picks

Discussion Comments
Kristie Lorette
Kristie Lorette
Kristie Lorette, a storyteller, copywriter, and content creator, helps businesses connect with their ideal audiences through compelling narratives. With an advanced degree and extensive experience, she crafts engaging long and short-form content that drives results across various platforms. Her ability to understand and connect with target audiences makes her a valuable asset to any content creation team.
Share
https://www.wise-geek.com/what-is-a-range-query.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.