query-0bfeaf21853e775152da19fedf26c8a6
List articles in the Alumni Oxonienses, 1st ed. SELECT ?item ?itemLabel ?page ?volume ?subject ?subjectLabel WHERE { VALUES (?BIOGRAPHICAL_ARTICLE ?ALUM_OX_1ST) { ( wd:Q19389637 wd:Q19036877 ) } ?item wdt:P31 ?BIOGRAPHICAL_ARTICLE; # is a biographical article (Q19389637) p:P1433 ?published_in_statement. ?published_in_statement ps:P1433 ?ALUM_OX_1ST. # published in Alumni Oxonienses, 1st ed. ?published_in_statement a wikibase:BestRank. OPTIONAL { ?published_in_statement pq:P304 ?page. } #?published_in_statement pq:P304 "77". # change the above line to this line to restrict to page 77. OPTIONAL { ?published_in_statement pq:P478 ?volume. } OPTIONAL { ?item wdt:P921 ?subject. } # FILTER (xsd:integer(?page) >= 50 && xsd:integer(?page) <= 100) # add this line to restrict to pages in the range 50–100. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } List articles in the Alumni Oxonienses, 1st ed. SELECT ?item ?itemLabel ?page ?volume ?subject ?subjectLabel WHERE { VALUES (?BIOGRAPHICAL_ARTICLE ?ALUM_OX_1ST) { ( wd:Q19389637 wd:Q19036877 ) } ?item wdt:P31 ?BIOGRAPHICAL_ARTICLE; # is a biographical article (Q19389637) p:P1433 ?published_in_statement. ?published_in_statement ps:P1433 ?ALUM_OX_1ST. # published in Alumni Oxonienses, 1st ed. ?published_in_statement a wikibase:BestRank. OPTIONAL { ?published_in_statement pq:P304 ?page. } #?published_in_statement pq:P304 "77". # change the above line to this line to restrict to page 77. OPTIONAL { ?published_in_statement pq:P478 ?volume. } OPTIONAL { ?item wdt:P921 ?subject. } # FILTER (xsd:integer(?page) >= 50 && xsd:integer(?page) <= 100) # add this line to restrict to pages in the range 50–100. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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#>
# List articles in the Alumni Oxonienses, 1st ed.
SELECT ?item ?itemLabel ?page ?volume ?subject ?subjectLabel
WHERE
{
VALUES (?BIOGRAPHICAL_ARTICLE ?ALUM_OX_1ST) { (
wd:Q19389637
wd:Q19036877
) }
?item wdt:P31 ?BIOGRAPHICAL_ARTICLE; # is a biographical article (Q19389637)
p:P1433 ?published_in_statement.
?published_in_statement ps:P1433 ?ALUM_OX_1ST. # published in Alumni Oxonienses, 1st ed.
?published_in_statement a wikibase:BestRank.
OPTIONAL { ?published_in_statement pq:P304 ?page. }
#?published_in_statement pq:P304 "77". # change the above line to this line to restrict to page 77.
OPTIONAL { ?published_in_statement pq:P478 ?volume. }
OPTIONAL { ?item wdt:P921 ?subject. }
# FILTER (xsd:integer(?page) >= 50 && xsd:integer(?page) <= 100) # add this line to restrict to pages in the range 50–100.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/bibliographic
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/bibliographic/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/bibliographic/nl