query-4c5f28383bd9446d58322c5b174dd160
to work: seems: It seems that when either part of the UNION in that query is excluded, the query runs. So I split both criteria into separate subqueries (with some other modifications) and it Gamaliel@ ]reply[17:28, 2 June 2020 (UTC) )talk( Gamaliel: The query works, but it only returns 797 items, while the last time Listeria successfully ran the query, it returned 3331 items. Mahir256@]reply[17:51, 2 June 2020 (UTC)) talk (Mahir256: It is easy to forget that query service lag exists. Gamaliel@ ]reply[17:44, 2 June 2020 (UTC) )talk( Gamaliel to that item but it didn't change the results. Is there a way to get the query to pull multiple occupations from that qualifier? (Q715301)comics artist . I added (Q65183699)Wikipedia:WikiProject Women in Red/Missing articles by occupation/Cartoonists : It looks like the list is pulling the occupation from Mahir256@ ]reply[17:36, 2 June 2020 (UTC) )talk( Gamaliel might have some insight. TagishsimonI don't know unfortunately. Maybe ]reply[17:34, 2 June 2020 (UTC)) talk (Mahir256). Would you happen to know how such de-linkages might have occurred? (Q24204895)art director , and (Q3024627)editorial cartoonist , (Q1114448)cartoonist : It seems, then, that some occupations previously returned in the "%i" subquery got lost (that part I did not change, and all that subquery returns are Gamaliel@
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?linkcount ?lambiekurl
where
{
{ { SELECT ?item ?linkcount {
{
select ?occ WHERE { VALUES ?occ {
wd:Q715301 # comics artists
wd:Q1114448 # cartoonists
}
}
}
{?item wdt:P106/wdt:P279* ?occ .} # item has this occupation
MINUS { ?item wdt:P5035 ?lambiek } # those in the Comiclopedia omitted here, since it will be returned in the other subquery
MINUS {?wen schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> . } # has no en.wikipedia sitelink
?item wdt:P21 wd:Q6581072 . # gender is female
?item wdt:P31 wd:Q5 . # instance is human
?item wikibase:sitelinks ?linkcount . # number of sitelinks for the item
}
}} UNION { { SELECT ?item ?linkcount ?lambiekurl {
{
select ?occ WHERE { VALUES ?occ {
wd:Q715301 # comics artists
wd:Q1114448 # cartoonists
}
}
}
?item wdt:P5035 ?lambiek. BIND ((CONCAT ("[https://www.lambiek.net/artists/", ?lambiek, ".htm entry]")) as ?lambiekurl) . # is in the Lambiek Comiclopedia
MINUS {?wen schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> . } # has no en.wikipedia sitelink
?item wdt:P21 wd:Q6581072 . # gender is female
?item wdt:P31 wd:Q5 . # instance is human
?item wikibase:sitelinks ?linkcount . # number of sitelinks for the item
}
}}
}