SPARQL Examples: Difference between revisions

From Semantic Lab
Jump to navigation Jump to search
m (MattTest moved page SPARQL EXAMPLES to SPARQL Examples without leaving a redirect)
No edit summary
Line 12: Line 12:
}
}
ORDER BY ?projectLabel
ORDER BY ?projectLabel
}}
=== All person records ===
{{SPARQL|query=#All person records associated with our projects on Wikibase
SELECT ?person ?personLabel ?project ?projectLabel
WHERE
{
  ?person  wdt:P1 wd:Q1.
  ?person wdt:P11 ?project.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?projectLabel
}}
=== All city records ===
{{SPARQL|query=#All city records associated with our projects on Wikibase
SELECT ?city ?cityLabel WHERE {
  ?city wdt:P1 wd:Q19058.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}
}}

Revision as of 05:36, 8 March 2024

All records

All records associated with our various projects on Wikibase


 # All records associated with our various projects on Wikibase

SELECT DISTINCT ?item ?itemLabel ?type ?typeLabel ?project ?projectLabel WHERE {

   ?item wdt:P1 ?type.
   ?item wdt:P11 ?project.
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 

} ORDER BY ?projectLabel


All person records

 #All person records associated with our projects on Wikibase

SELECT ?person ?personLabel ?project ?projectLabel WHERE {

 ?person  wdt:P1 wd:Q1.
 ?person wdt:P11 ?project.
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

}

ORDER BY ?projectLabel


All city records

 #All city records associated with our projects on Wikibase

SELECT ?city ?cityLabel WHERE {

 ?city wdt:P1 wd:Q19058.
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

}