User:Charles Matthews/Training supporting links2

From Wikidata
Jump to: navigation, search

Talk[edit]

Hands-on session[edit]

Data entry[edit]

Number Description Query Hits as of 29 June 2017, comments
1 Encyclopædia Britannica Online ID (P1417), no gender
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P1417 [] .
  ?item wdt:P31 wd:Q5 .
  OPTIONAL { ?item wdt:P21 ?dummy0 }
  FILTER(!bound(?dummy0))
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
10
2 Trilogies without genre
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q149010 .
  OPTIONAL { ?item wdt:P136 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
11
3 Villages with image but without country
SELECT ?item ?itemLabel ?image WHERE {
  ?item wdt:P31 wd:Q532 .
  ?item wdt:P18 ?image 
  OPTIONAL { ?item wdt:P17 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
166
4 Schools with image but without located in the administrative territorial entity (P131)
SELECT ?item ?itemLabel ?image WHERE {
  ?item wdt:P31 wd:Q3914 .
  ?item wdt:P18 ?image .
  OPTIONAL { ?item wdt:P131 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
399
5 Italian films without director
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q11424 .
  ?item wdt:P495 wd:Q38 .
  OPTIONAL { ?item wdt:P57 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
889
6 Historic houses without image
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q5773747 .
  OPTIONAL { ?item wdt:P18 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
1K, Timeline for all historic houses based on inception date
7 Members of the UK Parliament with National Portrait Gallery (London) person ID (P1816) but without image
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P39 wd:Q16707842 .
  ?item wdt:P1816 [ ]
  OPTIONAL { ?item wdt:P18 ?dummy0 }
  FILTER(!bound(?dummy0))
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
1862
8 Islands with image but without Commons category
SELECT ?item ?itemLabel ?image WHERE {
  ?item wdt:P31 wd:Q23442 .
  ?item wdt:P18 ?image 
  OPTIONAL { ?item wdt:P373 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
2.6K
9 Novels without author
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q571 .
  ?item wdt:P136 wd:Q8261 .
  OPTIONAL { ?item wdt:P50 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
2.6K
10 French females without occupation
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P21 wd:Q6581072 .
  ?item wdt:P27 wd:Q142 .
  OPTIONAL { ?item wdt:P106 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
2.9K, Timeline based on date of death
11 Battles without point in time (P585)
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q178561 .
  OPTIONAL { ?item wdt:P585 ?dummy0 }
  FILTER(!bound(?dummy0))
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
7K
12 Paintings without creator
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q3305213 .
  OPTIONAL { ?item wdt:P170 ?dummy0 }
  FILTER(!bound(?dummy0))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!
22K

Placenames[edit]

#defaultView:Map
SELECT ?item ?itemLabel ?coord
WHERE 
{
	?item wdt:P31/wdt:P279* wd:Q486972;
    	      wdt:P17 wd:Q145;
    	      rdfs:label ?itemLabel;
    	      wdt:P625 ?coord;
    	 FILTER (lang(?itemLabel) = "en") . 
    	 FILTER regex (?itemLabel, "(by)$").
}

Try it!

Fill a Venn diagram via SPARQL[edit]

WD-FIST[edit]

Subclasses[edit]

  • SELECT ?person ?occupation ?personLabel ?occupationLabel {
      ?person wdt:P31 wd:Q5 .
      ?person wdt:P21 wd:Q6581072 .
      ?person wdt:P27 wd:Q142 .
      ?person wdt:P106 ?occupation .
      ?occupation wdt:P279* wd:Q81096 .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
      }
    
    Try it!

Much more SPARQL[edit]