query-1114fc7abf1f9133905d401807d270f5

rq turtle/ttl

Show all comedians, their mainstream ID's and the BCG ID

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?linkcount ?ISNI ?VIAF ?IMDB ?Amazon ?Freebase ?GoogleKG ?BnF ?LinkedIn ?Goodreads ?Twitter ?BritishComedyGuide WHERE {
  ?item p:P106 ?statement.
  ?statement ps:P106 wd:Q245068.
  ?item wikibase:sitelinks ?linkcount .
  OPTIONAL { ?item wdt:P213 ?ISNI.}
  OPTIONAL { ?item wdt:P2002 ?Twitter.}
  OPTIONAL { ?item wdt:P214 ?VIAF.}
  OPTIONAL { ?item wdt:P345 ?IMDB.}
  OPTIONAL { ?item wdt:P4862 ?Amazon.}
  OPTIONAL { ?item wdt:P646 ?Freebase.}
  OPTIONAL { ?item wdt:P2671 ?GoogleKG.}
  OPTIONAL { ?item wdt:P2963 ?Goodreads.}
  OPTIONAL { ?statement pq:P268 ?BnF.} 
  OPTIONAL { ?statement pq:P6634 ?LinkedIn.}
  OPTIONAL { ?item wdt:P12627 ?BritishComedyGuide.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?linkcount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?Amazon"):::projected v12("?BnF"):::projected v14("?BritishComedyGuide"):::projected v9("?Freebase"):::projected v11("?Goodreads"):::projected v10("?GoogleKG"):::projected v7("?IMDB"):::projected v4("?ISNI"):::projected v13("?LinkedIn"):::projected v5("?Twitter"):::projected v6("?VIAF"):::projected v2("?item"):::projected v1("?linkcount"):::projected v3("?statement") c3(["wd:Q245068"]):::iri c17(["bd:serviceParam"]):::iri c19(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"p:P106"--> v3 v3 --"p:statement/P106"--> c3 v2 --"wikibase:sitelinks"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P213".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P2002".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P214".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P345".-> v7 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P4862".-> v8 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P646".-> v9 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P2671".-> v10 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P2963".-> v11 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P268".-> v12 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P6634".-> v13 end subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P12627".-> v14 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c17 --"wikibase:language"--> c19 end