query-c630aa7dd31527330d854cac55c9f687
10:50, 27 May 2017 (UTC) Jura--- The above works. Limiting it to ?description1 wasn't sufficient to get it to work faster. On, wonderful! Hadn't realised I could do both descriptions with the same value. And based on that I can add a text filter:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?description1 ?item1 ?item1Label ?item2 ?item2Label
{
{ SELECT DISTINCT ?item1 ?description1 ?item2
{
?item1 wdt:P1415 ?whatever1 .
?item2 wdt:P1415 ?whatever2 .
?item1 schema:description ?description1 .
?item2 schema:description ?description1 .
FILTER(LANG(?description1) = "en" && ?item1 != ?item2 && str(?item1) < str(?item2) ) .
FILTER (CONTAINS(str(?description1),'('))
}
LIMIT 1000
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }