{"id":864,"date":"2020-02-03T16:39:39","date_gmt":"2020-02-03T16:39:39","guid":{"rendered":"http:\/\/wikidata.wwwnlsrc4.supercp.com\/?p=864"},"modified":"2020-07-29T14:52:02","modified_gmt":"2020-07-29T14:52:02","slug":"exercise-location-2","status":"publish","type":"post","link":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/where-queries\/exercise-location-2\/","title":{"rendered":"Another exercise"},"content":{"rendered":"\n<h4>| Exercise: Write a query to show where the actors in each film in the Star Wars film series were born.<\/h4>\n\n\n\n<p>Tip: use <a href=\"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/simple-queries\/instances-and-classes\/distinct\/\">DISTINCT <\/a>to remove duplicates from the results<\/p>\n\n\n\n<iframe class=\"\" src=\"https:\/\/query.wikidata.org\/\" style=\"width:100%;max-width:100%;height:450px\" frameborder=\"0\"><\/iframe>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">show solution<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<p><\/p>\n\n\n\n<iframe class=\"\" src=\"https:\/\/query.wikidata.org\/#%23Star%20Wars%20actors%27%20place%20of%20birth%0A%23defaultView%3AMap%0A%0ASELECT%20DISTINCT%20%3Factor%20%3FactorLabel%20%3FpobLabel%20%3Fcoord%0AWHERE%20%0A%7B%20%0A%20%20%3Fitem%20wdt%3AP179%20wd%3AQ22092344.%20%23%20item%20is%20part%20of%20the%20series%20Star%20Wars%20%28film%20series%29%0A%20%20%3Fitem%20wdt%3AP161%20%3Factor.%20%20%20%20%20%20%20%23%20item%E2%80%99s%20cast%20member%20property%E2%80%99s%20value%20is%20collected%20by%20the%20actor%20variable%0A%20%20%3Factor%20wdt%3AP19%20%3Fpob.%20%20%20%20%20%20%20%20%20%23%20actor%27s%20place%20of%20birth%20is%20collected%20in%20the%20%3Fpob%20variable%0A%20%20%3Fpob%20wdt%3AP625%20%3Fcoord.%20%20%20%20%20%20%20%20%23%20place%20of%20birth%27s%20coordinates%20are%20collected%20by%20the%20%3Fcoords%20variable%0A%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%22.%20%7D%0A%7D%0A\" style=\"width:100%;max-width:100%;height:450px\" frameborder=\"0\"><\/iframe>\n\n\n\n<p><\/p>\n\n\n\n<p>Edit the query to add the image (P18) of each actor to the results<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">show solution<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<p><\/p>\n\n\n\n<iframe class=\"\" src=\"https:\/\/query.wikidata.org\/#%23Star%20Wars%20actors%27%20place%20of%20birth%0A%23defaultView%3AMap%0A%0ASELECT%20DISTINCT%20%3Factor%20%3FactorLabel%20%3Fimage%20%3FpobLabel%20%3Fcoord%0AWHERE%20%0A%7B%20%0A%20%20%3Fitem%20wdt%3AP179%20wd%3AQ22092344.%20%23%20item%20is%20part%20of%20the%20series%20Star%20Wars%20%28film%20series%29%0A%20%20%3Fitem%20wdt%3AP161%20%3Factor.%20%20%20%20%20%20%20%23%20item%E2%80%99s%20cast%20member%20property%E2%80%99s%20value%20is%20collected%20by%20the%20actor%20variable%0A%20%20%3Factor%20wdt%3AP18%20%3Fimage.%20%20%20%20%20%20%20%23%20actor%27s%20image%20is%20collected%20by%20the%20%3Fimage%20variable%20%0A%20%20%3Factor%20wdt%3AP19%20%3Fpob.%20%20%20%20%20%20%20%20%20%23%20actor%27s%20place%20of%20birth%20is%20collected%20in%20the%20%3Fpob%20variable%0A%20%20%3Fpob%20wdt%3AP625%20%3Fcoord.%20%20%20%20%20%20%20%20%23%20place%20of%20birth%27s%20coordinates%20are%20collected%20by%20the%20%3Fcoords%20variable%0A%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%22.%20%7D%0A%7D%0A\" style=\"width:100%;max-width:100%;height:475px\" frameborder=\"0\"><\/iframe>\n\n\n\n<p>If you&#8217;re wondering why there are less results than in the previous query, see the section about the <a href=\"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/simple-queries\/adding-variables\/optional-clause\/\">OPTIONAL clause<\/a>.<\/p>\n<\/div><\/details><\/div>\n<\/div>\n<\/div><\/details><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>| Exercise: Write a query to show where the actors in each film in the Star Wars film series were born. Tip: use DISTINCT to remove duplicates from the results<\/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":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/864"}],"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=864"}],"version-history":[{"count":18,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/864\/revisions"}],"predecessor-version":[{"id":1473,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/864\/revisions\/1473"}],"wp:attachment":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/media?parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/categories?post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/tags?post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}