Open Zenderl opened 6 months ago
voilà — il y a encore quelques améliorations à apporter, ce sera la semaine prochaine
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?birthYear ?gender ?genderLabel ?position ?positionLabel ?startYear ?startTime ?endTime
where {
?item wdt:P31 wd:Q5; # Any instance of a human.
p:P39 ?statement.
?statement ps:P39 wd:Q18510612;
ps:P39 ?position;
pq:P580 ?startTime;
pq:P582 ?endTime.
?item wdt:P569 ?birthDate.
?item wdt:P21 ?gender
BIND(REPLACE(str(?startTime), "(.)([0-9]{4})(.)", "$2") AS ?startYear)
BIND(REPLACE(str(?birthDate), "(.)([0-9]{4})(.)", "$2") AS ?birthYear)
FILTER (?startYear > '1950')
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?startYear
LIMIT 900
J'aurais besoin de rajouter une catégorie pour le genre dans les select. Serait-il aussi possible d'expliquer dans un tutorat comment on rajoute des catégorie et comment on les inclue dans les conditions pour que la case ne soient pas mis comme vide.
Bien à vous, Lara
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?birthYear ?position ?positionLabel ?startYear ?startTime ?endTime where { ?item wdt:P31 wd:Q5; # Any instance of a human. p:P39 ?statement. ?statement ps:P39 wd:Q18510612; ps:P39 ?position; pq:P580 ?startTime; pq:P582 ?endTime. ?item wdt:P569 ?birthDate. BIND(REPLACE(str(?startTime), "(.)([0-9]{4})(.)", "$2") AS ?startYear) BIND(REPLACE(str(?birthDate), "(.)([0-9]{4})(.)", "$2") AS ?birthYear)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } ORDER BY ?startYear LIMIT 900