Modelling/Projects: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 93: Line 93:
|}
|}


Query to find all projects and more information about them:
<SPARQL tryit="1">
PREFIX wd: <https://metabase.wikibase.cloud/entity/>
PREFIX wdt: <https://metabase.wikibase.cloud/prop/direct/>


SELECT ?item ?itemLabel ?start ?end (GROUP_CONCAT(DISTINCT ?mainsubjectLabel; SEPARATOR = ", ") AS ?topics) (GROUP_CONCAT(DISTINCT ?organizerLabel; SEPARATOR = ", ") AS ?organizers)
WHERE
{
  ?item wdt:P5 wd:Q2 .
  OPTIONAL {  ?item wdt:P6 ?start.}
  OPTIONAL { ?item wdt:P7 ?end.}
  OPTIONAL { ?item wdt:P15 ?mainsubject.}
  OPTIONAL { ?item wdt:P14 ?organizer.}
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "sv".
    ?item rdfs:label ?itemLabel.
    ?mainsubject rdfs:label ?mainsubjectLabel.
    ?organizer rdfs:label ?organizerLabel
  }
}
GROUP BY ?item ?itemLabel ?start ?end
ORDER BY ?itemLabel
</SPARQL>
[[Category:Documentation|p]]
[[Category:Documentation|p]]

Navigation menu