query-3e5560fd552ca788eb5af579492e7d69

rq turtle/ttl

Types of theatre professionals (theatrical occupations) by number of instances (obsolete) This query is pretty much obsolete; the data modelling has been corrected for most of the items. To be kept for housekeeping purposes. Types of theatre professionals (theatrical occupations) by number of instances (obsolete)This query is pretty much obsolete; the data modelling has been corrected for most of the items. To be kept for housekeeping purposes. Types de professionnels du théâtre (professions théâtrales) par nombre de cas (obsolètes)Cette requête est assez fortement obsolète ; la modélisation des données a été corrigée pour la plupart des éléments. A conserver pour des raisons de gestion. Soorten theaterprofessionals (theatrale beroepen) naar aantal instanties (verouderd)Deze query is vrijwel verouderd; de datamodellering is voor de meeste items gecorrigeerd. Wordt voor huishoudelijke doeleinden bewaard. Types of theatre professionals (theatrical occupations) by number of instances (obsolete) This query is pretty much obsolete; the data modelling has been corrected for most of the items. To be kept for housekeeping purposes. Types of theatre professionals (theatrical occupations) by number of instances (obsolete) This query is pretty much obsolete; the data modelling has been corrected for most of the items. To be kept for housekeeping purposes.

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?type 
 (COUNT(DISTINCT ?instance) AS ?count)
 ?Label_en
 (group_concat(distinct ?occupationType1_en;separator="; ") as ?occupationTypes1_en) 
 (group_concat(distinct ?occupationType2_en;separator="; ") as ?occupationTypes2_en)
 (group_concat(distinct ?occupationType3_en;separator="; ") as ?occupationTypes3_en)
 (group_concat(distinct ?occupationType4_en;separator="; ") as ?occupationTypes4_en)
WHERE {
 ?type wdt:P279* wd:Q15839299.
 OPTIONAL { ?instance wdt:P106 ?type }  
 OPTIONAL { ?type rdfs:label ?Label_en . FILTER (lang(?Label_en) = "en") }
 OPTIONAL { ?type wdt:P279+ ?occupationType1 . ?occupationType1 wdt:P279/^wdt:P279 wd:Q15839299 . ?occupationType1 rdfs:label ?occupationType1_en . FILTER (lang(?occupationType1_en) = "en") }
 OPTIONAL { ?type wdt:P279+ ?occupationType2 . ?occupationType2 wdt:P279 wd:Q15839299 . ?occupationType2 rdfs:label ?occupationType2_en . FILTER (lang(?occupationType2_en) = "en") }
 OPTIONAL { ?type wdt:P279+ ?occupationType3 . ?occupationType3 wdt:P279/wdt:P279 wd:Q15839299 . ?occupationType3 rdfs:label ?occupationType3_en . FILTER (lang(?occupationType3_en) = "en") }
 OPTIONAL { ?type wdt:P279+ ?occupationType4 . ?occupationType4 wdt:P279/wdt:P279/wdt:P279 wd:Q15839299 . ?occupationType4 rdfs:label ?occupationType4_en . FILTER (lang(?occupationType4_en) = "en") }
}
GROUP BY ?type                      #List all the variables for which the values are not concatenated!
  ?count
  ?Label_en 
ORDER BY DESC(?count)
LIMIT 10000

Query found at