User:Alicia Fagerving (WMSE)/Sandbox: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 85: Line 85:
PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>
SELECT ?item ?itemLabel ?when ?wikipage (GROUP_CONCAT(DISTINCT ?speakerLabel; SEPARATOR = ", ") AS ?speakers)
SELECT ?item ?itemLabel ?when ?wikipage (GROUP_CONCAT(DISTINCT ?speakerLabel; SEPARATOR = ", ") AS ?speakers) (GROUP_CONCAT(DISTINCT ?mainsubjectLabel; SEPARATOR = ", ") AS ?topics)
WHERE
WHERE
{
{
Line 92: Line 92:
OPTIONAL {?item wbt:P33 ?speaker}
OPTIONAL {?item wbt:P33 ?speaker}
OPTIONAL {?item wbt:P11 ?wikipage}
OPTIONAL {?item wbt:P11 ?wikipage}
OPTIONAL {?item wbt:P15 ?mainsubject}
   SERVICE wikibase:label {
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en,sv,es".
     bd:serviceParam wikibase:language "en,sv,es".
     ?item rdfs:label ?itemLabel.
     ?item rdfs:label ?itemLabel.
     ?speaker rdfs:label ?speakerLabel.
     ?speaker rdfs:label ?speakerLabel.
    ?mainsubject rdfs:label ?mainsubjectLabel.
   }
   }
}
}

Navigation menu