{"id":2581,"date":"2017-09-22T10:04:28","date_gmt":"2017-09-22T09:04:28","guid":{"rendered":"https:\/\/www.threesl.com\/blog\/?p=2581"},"modified":"2022-08-23T15:32:58","modified_gmt":"2022-08-23T14:32:58","slug":"querying-a-range","status":"publish","type":"post","link":"https:\/\/www.threesl.com\/blog\/querying-a-range\/","title":{"rendered":"Querying a Range"},"content":{"rendered":"<h2>Categories and Calculations in Range<\/h2>\n<p>When running a query it is possible to specify more than just a single value. Categories and calculations with a numeric value can be queried to exist in a range. For example querying a range for categories, or calculations that have a numeric value can be tested for the mathematical values:<\/p>\n<ul>\n<li>Is equal to<\/li>\n<li>is not equal to<\/li>\n<li>Is in range<\/li>\n<li>Is less than or equal to<\/li>\n<li>is less than<\/li>\n<li>is more than or equal to<\/li>\n<li>is more than<\/li>\n<\/ul>\n<p>It can also be tested against the logical<\/p>\n<ul>\n<li>Is empty<\/li>\n<li>Is not empty<\/li>\n<\/ul>\n<p>or textually<\/p>\n<ul>\n<li>Contains<\/li>\n<\/ul>\n<figure id=\"attachment_2582\" aria-describedby=\"caption-attachment-2582\" style=\"width: 226px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2582\" src=\"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_menuy.png\" alt=\"menu showing numeric query specifiers\" width=\"226\" height=\"197\" \/><figcaption id=\"caption-attachment-2582\" class=\"wp-caption-text\">Numeric Query Specifiers<\/figcaption><\/figure>\n<h2>Results<\/h2>\n<p>The following screen shot shows the result of running a query against all of the item type and re-running with a range calculation.<\/p>\n<p>The top half of the display shows the calculation having 14<sup>m2<\/sup> up to 22.5<sup>m2<\/sup>, but the query Mid Floor Area limits the return to those between 15<sup>m2<\/sup> and 20<sup>m2<\/sup>.<\/p>\n<figure id=\"attachment_2583\" aria-describedby=\"caption-attachment-2583\" style=\"width: 1161px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2583 size-full\" src=\"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_query.png\" alt=\"result of running a query witha nd without a range\" width=\"1161\" height=\"672\" srcset=\"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_query.png 1161w, https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_query-300x174.png 300w, https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_query-768x445.png 768w, https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_query-1024x593.png 1024w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption id=\"caption-attachment-2583\" class=\"wp-caption-text\">Querying a Range<\/figcaption><\/figure>\n<aside class=\"mashsb-container mashsb-main mashsb-stretched\"><div class=\"mashsb-box\"><div class=\"mashsb-buttons\"><a class=\"mashicon-twitter mash-small mash-center mashsb-noshadow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=&amp;url=https:\/\/www.threesl.com\/blog\/querying-a-range\/&amp;via=threesl\" target=\"_top\" rel=\"nofollow\"><span class=\"icon\"><\/span><span class=\"text\">Tweet<\/span><\/a><a class=\"mashicon-facebook mash-small mash-center mashsb-noshadow\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.threesl.com%2Fblog%2Fquerying-a-range%2F\" target=\"_top\" rel=\"nofollow\"><span class=\"icon\"><\/span><span class=\"text\">Share<\/span><\/a><a class=\"mashicon-subscribe mash-small mash-center mashsb-noshadow\" href=\"#\" target=\"_top\" rel=\"nofollow\"><span class=\"icon\"><\/span><span class=\"text\">Newsletter<\/span><\/a><div class=\"onoffswitch2 mash-small mashsb-noshadow\" style=\"display:none\"><\/div><\/div>\n            <\/div>\n                <div style=\"clear:both\"><\/div><\/aside>\n            <!-- Share buttons by mashshare.net - Version: 4.0.47-->","protected":false},"excerpt":{"rendered":"<p>Categories and Calculations in Range When running a query it is possible to specify more than just a single value. Categories and calculations with a numeric value can be queried to exist in a range. For example querying a range for categories, or calculations that have a numeric value can be tested for the mathematical &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.threesl.com\/blog\/querying-a-range\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Querying a Range&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[6],"tags":[510],"class_list":["post-2581","post","type-post","status-publish","format-standard","hentry","category-tips","tag-queries"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Querying a Range - 3SL Blog<\/title>\n<meta name=\"description\" content=\"Sometimes data is required that matches more than one value. Querying a range for numeric categories and calculations returns the required result.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.threesl.com\/blog\/querying-a-range\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Querying a Range - 3SL Blog\" \/>\n<meta property=\"og:description\" content=\"Sometimes data is required that matches more than one value. Querying a range for numeric categories and calculations returns the required result.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.threesl.com\/blog\/querying-a-range\/\" \/>\n<meta property=\"og:site_name\" content=\"3SL Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/3SLCradle\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-22T09:04:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-23T14:32:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_menuy.png\" \/>\n<meta name=\"author\" content=\"3SL\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@threesl\" \/>\n<meta name=\"twitter:site\" content=\"@threesl\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"3SL\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/\"},\"author\":{\"name\":\"3SL\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/person\\\/749ccd9b2d74303fa8927e06c2af8b0b\"},\"headline\":\"Querying a Range\",\"datePublished\":\"2017-09-22T09:04:28+00:00\",\"dateModified\":\"2022-08-23T14:32:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/\"},\"wordCount\":176,\"publisher\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/range_menuy.png\",\"keywords\":[\"queries\"],\"articleSection\":[\"Hints &amp; Tips\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/\",\"name\":\"Querying a Range - 3SL Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/range_menuy.png\",\"datePublished\":\"2017-09-22T09:04:28+00:00\",\"dateModified\":\"2022-08-23T14:32:58+00:00\",\"description\":\"Sometimes data is required that matches more than one value. Querying a range for numeric categories and calculations returns the required result.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/range_menuy.png\",\"contentUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/range_menuy.png\",\"width\":226,\"height\":197,\"caption\":\"Numeric Query Specifiers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/querying-a-range\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Querying a Range\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/\",\"name\":\"3SL Blog\",\"description\":\"From concept to creation\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#organization\",\"name\":\"3SL\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/3SL_Logo_Medium.png\",\"contentUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/3SL_Logo_Medium.png\",\"width\":152,\"height\":80,\"caption\":\"3SL\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"http:\\\/\\\/facebook.com\\\/3SLCradle\",\"https:\\\/\\\/x.com\\\/threesl\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/person\\\/749ccd9b2d74303fa8927e06c2af8b0b\",\"name\":\"3SL\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g\",\"caption\":\"3SL\"},\"sameAs\":[\"http:\\\/\\\/www.threesl.com\\\/\",\"https:\\\/\\\/x.com\\\/threesl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Querying a Range - 3SL Blog","description":"Sometimes data is required that matches more than one value. Querying a range for numeric categories and calculations returns the required result.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.threesl.com\/blog\/querying-a-range\/","og_locale":"en_GB","og_type":"article","og_title":"Querying a Range - 3SL Blog","og_description":"Sometimes data is required that matches more than one value. Querying a range for numeric categories and calculations returns the required result.","og_url":"https:\/\/www.threesl.com\/blog\/querying-a-range\/","og_site_name":"3SL Blog","article_publisher":"http:\/\/facebook.com\/3SLCradle","article_published_time":"2017-09-22T09:04:28+00:00","article_modified_time":"2022-08-23T14:32:58+00:00","og_image":[{"url":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_menuy.png","type":"","width":"","height":""}],"author":"3SL","twitter_card":"summary_large_image","twitter_creator":"@threesl","twitter_site":"@threesl","twitter_misc":{"Written by":"3SL","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/#article","isPartOf":{"@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/"},"author":{"name":"3SL","@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/person\/749ccd9b2d74303fa8927e06c2af8b0b"},"headline":"Querying a Range","datePublished":"2017-09-22T09:04:28+00:00","dateModified":"2022-08-23T14:32:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/"},"wordCount":176,"publisher":{"@id":"https:\/\/www.threesl.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/#primaryimage"},"thumbnailUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_menuy.png","keywords":["queries"],"articleSection":["Hints &amp; Tips"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/","url":"https:\/\/www.threesl.com\/blog\/querying-a-range\/","name":"Querying a Range - 3SL Blog","isPartOf":{"@id":"https:\/\/www.threesl.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/#primaryimage"},"image":{"@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/#primaryimage"},"thumbnailUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_menuy.png","datePublished":"2017-09-22T09:04:28+00:00","dateModified":"2022-08-23T14:32:58+00:00","description":"Sometimes data is required that matches more than one value. Querying a range for numeric categories and calculations returns the required result.","breadcrumb":{"@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.threesl.com\/blog\/querying-a-range\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/#primaryimage","url":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_menuy.png","contentUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/09\/range_menuy.png","width":226,"height":197,"caption":"Numeric Query Specifiers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.threesl.com\/blog\/querying-a-range\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.threesl.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Querying a Range"}]},{"@type":"WebSite","@id":"https:\/\/www.threesl.com\/blog\/#website","url":"https:\/\/www.threesl.com\/blog\/","name":"3SL Blog","description":"From concept to creation","publisher":{"@id":"https:\/\/www.threesl.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.threesl.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.threesl.com\/blog\/#organization","name":"3SL","url":"https:\/\/www.threesl.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/3SL_Logo_Medium.png","contentUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/3SL_Logo_Medium.png","width":152,"height":80,"caption":"3SL"},"image":{"@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/3SLCradle","https:\/\/x.com\/threesl"]},{"@type":"Person","@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/person\/749ccd9b2d74303fa8927e06c2af8b0b","name":"3SL","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g","caption":"3SL"},"sameAs":["http:\/\/www.threesl.com\/","https:\/\/x.com\/threesl"]}]}},"modified_by":"Jan Lamb","_links":{"self":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts\/2581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/comments?post=2581"}],"version-history":[{"count":3,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts\/2581\/revisions"}],"predecessor-version":[{"id":7521,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts\/2581\/revisions\/7521"}],"wp:attachment":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/media?parent=2581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/categories?post=2581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/tags?post=2581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}