query-79fa5d36aa597f3c541ea3f9247e6dae

rq turtle/ttl

Find/highlight possible duplicates 18:26, 11 June 2023 (UTC) 💛●✒️●💬 Bouzinac I can find them in Excel but a more direct way of finding would be appreciable https://w.wiki/6pRBIs there a way to highlight possibles duplicates for instance things that share a same date inside a long list ? Eg inside : You can group items with the same date like this, if it's any help: Bouzinac@

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?date (group_concat(?accident_ferroviaire; separator=";") as ?accidents_ferroviaires)  WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?accident_ferroviaire wdt:P31/wdt:P279* wd:Q1078765; wdt:P17 ?pays;wdt:P585 ?date.
OPTIONAL { ?accident_ferroviaire wdt:P1120 ?nombre_de_morts. }
}                   
group by ?date order by ?date

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?accident_ferroviaire"):::projected v5("?accidents_ferroviaires") v1("?date"):::projected v4("?nombre_de_morts") v3("?pays") a1((" ")) c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal c7(["wd:Q1078765"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c7 v2 --"wdt:P17"--> v3 v2 --"wdt:P585"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1120".-> v4 end bind1[/"?accident_ferroviaire"/] v2 --o bind1 bind1 --as--o v5