{"id":2178,"date":"2021-07-16T16:51:02","date_gmt":"2021-07-16T16:51:02","guid":{"rendered":"https:\/\/wdqs-tutorial.toolforge.org\/?p=2178"},"modified":"2021-07-20T17:55:48","modified_gmt":"2021-07-20T17:55:48","slug":"union-operator","status":"publish","type":"post","link":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/simple-queries-pt-br\/adding-match-patterns-pt-br\/union-operator\/?lang=pt-br","title":{"rendered":"Operador UNION"},"content":{"rendered":"\n<h2>Reconhecimento de padr\u00f5es usando a rela\u00e7\u00e3o OU<\/h2>\n\n\n\n<p>Vimos na se\u00e7\u00e3o anterior que, se listarmos dois padr\u00f5es a serem reconhecidos, eles ter\u00e3o uma rela\u00e7\u00e3o E. Isto \u00e9, a consulta s\u00f3 vai retornar os itens que correspondam a ambas as condi\u00e7\u00f5es. Se quisermos ter uma rela\u00e7\u00e3o OU entre as condi\u00e7\u00f5es, precisamos utilizar o operador UNION (\u201cuni\u00e3o\u201d, em portugu\u00eas). A consulta a seguir recupera itens que s\u00e3o partes das sagas de filmes Star Wars <strong>ou<\/strong> Star Trek.<\/p>\n\n\n\n<iframe class=\"\" src=\"https:\/\/query.wikidata.org\/#%23Filmes%20das%20sagas%20Star%20Wars%20OU%20Star%20Trek%0A%0ASELECT%20%3Fitem%20%20%3FitemLabel%20%0AWHERE%20%0A%7B%20%0A%20%20%7B%3Fitem%20wdt%3AP179%20wd%3AQ22092344.%7D%20%23%20item%20faz%20parte%20da%20saga%20de%20filmes%20Star%20Wars%0A%20%20UNION%0A%20%20%7B%3Fitem%20wdt%3AP179%20wd%3AQ1102217.%7D%20%23%20item%20faz%20parte%20da%20saga%20de%20filmes%20Star%20Trek%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%22.%20%7D%0A%7D\" style=\"width:100%;max-width:100%;height:450px\" frameborder=\"0\"><\/iframe>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reconhecimento de padr\u00f5es usando a rela\u00e7\u00e3o OU Vimos na se\u00e7\u00e3o anterior que, se listarmos dois padr\u00f5es a serem reconhecidos, eles ter\u00e3o uma rela\u00e7\u00e3o E. Isto \u00e9, a consulta s\u00f3 vai retornar os itens que correspondam a ambas as condi\u00e7\u00f5es. Se quisermos ter uma rela\u00e7\u00e3o OU entre as condi\u00e7\u00f5es, precisamos utilizar o operador UNION (\u201cuni\u00e3o\u201d, em [&hellip;]<\/p>\n","protected":false},"author":3,"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":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/2178"}],"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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/comments?post=2178"}],"version-history":[{"count":3,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/2178\/revisions"}],"predecessor-version":[{"id":2382,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/2178\/revisions\/2382"}],"wp:attachment":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/media?parent=2178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/categories?post=2178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/tags?post=2178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}