3,427
edits
Line 2,707: | Line 2,707: | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# union query to get [hopefully] every date associated with women FSAs including main dates and qualifier dates | # fishing for dates for FSAs | ||
# union query to get [hopefully] every date associated with women FSAs including main dates and qualifier dates, with date precision | |||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 2,719: | Line 2,720: | ||
PREFIX bnpqv: <https://beyond-notability.wikibase.cloud/prop/qualifier/value/> | PREFIX bnpqv: <https://beyond-notability.wikibase.cloud/prop/qualifier/value/> | ||
SELECT distinct ?person ?personLabel ?date_prop_label ?date_value ?date_precision ? | SELECT distinct ?person ?personLabel ?date_prop_label ?date_value ?date_precision ?pdv ?pdvLabel | ||
#?s | #?s ?date_prop ?date_prop_type | ||
WHERE { | WHERE { | ||
Line 2,764: | Line 2,764: | ||
wikibase:statementProperty ?ps. | wikibase:statementProperty ?ps. | ||
?prop rdfs:label ?prop_label. filter(lang(?prop_label)="en-gb") . | ?prop rdfs:label ?prop_label. filter(lang(?prop_label)="en-gb") . | ||
# get stuff about ?p via ps. . | |||
# pdv was called ?qual but it isn't a qual; it's the direct value (usually item) for the property, things like annual meeting, girton college. . | |||
?s ?ps ?pdv. | |||
# get qualifier dates | # get qualifier dates . ?pq is the date property like P1 . | ||
?s ?pq ?pqs . | ?s ?pq ?pqs . | ||
# get pq and restrict to dates here, instead of using a filter. | |||
?qual_prop wikibase:qualifier ?pq. | |||
?qual_prop wikibase:propertyType wikibase:Time. | |||
?qual_prop rdfs:label ?date_prop_label . filter(lang(?date_prop_label)="en") . | |||
?qual_prop wikibase:qualifier ?pq | |||
?qual_prop rdfs:label ?date_prop_label . filter(lang(?date_prop_label)="en | |||
# get | # now get detail. | ||
?s ?date_prop ?pqv . | ?s ?date_prop ?pqv . | ||
?pqv wikibase:timeValue ?date_value. | ?pqv wikibase:timeValue ?date_value. | ||
?pqv wikibase:timePrecision ?date_precision. | ?pqv wikibase:timePrecision ?date_precision. | ||
} # /qual dates | } # /qual dates | ||
edits