{"id":1076,"date":"2020-02-18T11:32:56","date_gmt":"2020-02-18T11:32:56","guid":{"rendered":"http:\/\/wikidata.wwwnlsrc4.supercp.com\/?p=1076"},"modified":"2020-11-29T14:59:42","modified_gmt":"2020-11-29T14:59:42","slug":"limit","status":"publish","type":"post","link":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/modifying-results\/limit\/","title":{"rendered":"LIMIT"},"content":{"rendered":"\n<h2>LIMIT<\/h2>\n\n\n\n<p>The&nbsp;LIMIT&nbsp;modifier can be used after the WHERE clause to return a specific number of results.<\/p>\n\n\n\n<p>For example, the following query shows the 10 highest-grossing films that are part of a series.<\/p>\n\n\n\n<iframe class=\"\" src=\"https:\/\/query.wikidata.org\/#%23%20Top%2010%20highest-grossing%20films%20that%20are%20part%20of%20a%20series%0A%0ASELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20%3Fboxoffice%20%0AWHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ11424.%20%20%20%20%20%23%20Item%20is%20an%20instance%20of%20a%20film%20or%20subclass%20thereof%0A%20%20%3Fitem%20wdt%3AP179%20%3Fseries.%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Item%20has%20a%20%22part%20of%20the%20series%22%20property%0A%20%20%3Fitem%20wdt%3AP2142%20%3Fboxoffice%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20%3Fboxoffice%20collects%20the%20value%20of%20the%20box%20office%20property%0ASERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%22.%20%7D%0A%20%20%7D%0AORDER%20BY%20DESC%28%3Fboxoffice%29%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20In%20descending%20order%0ALIMIT%2010%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Show%20the%20top%20ten%20results%20%20%20%20%20%20%20%20\" style=\"width:100%;max-width:100%;height:450px\" frameborder=\"0\"><\/iframe>\n\n\n\n<p>Note that the GROUP BY modifier only works with an aggregate function (such as COUNT). The modifiers ORDER BY and LIMIT do not require an aggregate function.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LIMIT The&nbsp;LIMIT&nbsp;modifier can be used after the WHERE clause to return a specific number of results. For example, the following query shows the 10 highest-grossing films that are part of a series. Note that the GROUP BY modifier only works with an aggregate function (such as COUNT). The modifiers ORDER BY and LIMIT do not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/1076"}],"collection":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/comments?post=1076"}],"version-history":[{"count":6,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/1076\/revisions"}],"predecessor-version":[{"id":1987,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/1076\/revisions\/1987"}],"wp:attachment":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/media?parent=1076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/categories?post=1076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/tags?post=1076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}