Open Daniel-Mietchen opened 7 years ago
The query barely runs through for Uta Frith, so I removed the VALUES part:
PREFIX target: <http://www.wikidata.org/entity/Q8219>
SELECT DISTINCT ?work2 ?work2Label ?date
(GROUP_CONCAT(DISTINCT ?author2Label; separator=", ") AS ?authorLabels)
WHERE {
?work wdt:P50 target: .
?work wdt:P50 ?author1 .
?work wdt:P50 ?author2 .
?work2 wdt:P50 ?author2 ;
wdt:P577 ?date.
MINUS { ?work2 wdt:P50 target: } .
?author2 rdfs:label ?author2Label . filter (lang(?author2Label) = 'en')
?work2 rdfs:label ?work2Label . filter (lang(?work2Label) = 'en')
} GROUP BY ?work2 ?work2Label ?date
ORDER BY DESC (?date)
LIMIT 200
This times out for people with large collaboration networks, so it would make sense to limit this to a maximum of co-authors.
This runs in two seconds:
SELECT
?date ?work ?workLabel
(GROUP_CONCAT(?author_string; separator=" // ") AS ?authors)
WHERE {
{
SELECT (MAX(?date_) AS ?date) ?work
WHERE {
BIND(wd:Q8219 AS ?target)
[] wdt:P50 ?target, ?author_ .
?work wdt:P50 ?author_ ;
wdt:P577 ?date_ .
MINUS { ?work wdt:P50 ?target } .
}
GROUP BY ?work
ORDER BY DESC (?date)
LIMIT 200
}
hint:Query hint:optimizer "None" .
?work wdt:P50 ?author .
?author rdfs:label ?author_string .
FILTER (LANG(?author_string) = 'en')
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?date ?work ?workLabel
ORDER BY DESC(?date)
Tested this for
In the author aspect, something like recent publications by former co-authors could be a useful discovery tool (shown here for Uta Frith):