Closed physikerwelt closed 1 month ago
This is somehow done. However one needs to manually remove the select count. I think this can be a good entry point for people to learn SPARQL but maybe the we should improve the UI to help people editing queries
cc @Daniel-Mietchen @timconrad
Ich hatte da verstanden, dass die tatsaechlichen Eintraege angezeigt werden sollen - nicht die "Zahl". Aber das kann man ja leicht in der SPARQL Abfrage aendern, oder? )(Dann muss da natuerlich ein LIMIT rein)
@Daniel-Mietchen do you know a more efficient way to compute the labels
PREFIX wdt: <https://portal.mardi4nfdi.de/prop/direct/>
PREFIX wd: <https://portal.mardi4nfdi.de/entity/>
SELECT ?itemLabel ?value ?item # Replace with (COUNT(*) as ?cnt) to get the count
WHERE { ?item ?p ?value .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
} }
LIMIT 50 # Remove this line to get the counts
times out whereas
PREFIX wdt: <https://portal.mardi4nfdi.de/prop/direct/>
PREFIX wd: <https://portal.mardi4nfdi.de/entity/>
SELECT ?itemLabel ?value ?item # Replace with (COUNT(*) as ?cnt) to get the count
WHERE { ?item ?p ?value }
LIMIT 50 # Remove this line to get the counts
computes in 0.1s
Besides the label, I think this is done. See https://portal.mardi4nfdi.de/w/index.php?title=Template%3AStatisticsRow&diff=34162067&oldid=9909283 for the implementation
@Daniel-Mietchen do you know a more efficient way to compute the labels
PREFIX wdt: <https://portal.mardi4nfdi.de/prop/direct/> PREFIX wd: <https://portal.mardi4nfdi.de/entity/> SELECT ?itemLabel ?value ?item # Replace with (COUNT(*) as ?cnt) to get the count WHERE { ?item ?p ?value . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } LIMIT 50 # Remove this line to get the counts
times out whereas
PREFIX wdt: <https://portal.mardi4nfdi.de/prop/direct/> PREFIX wd: <https://portal.mardi4nfdi.de/entity/> SELECT ?itemLabel ?value ?item # Replace with (COUNT(*) as ?cnt) to get the count WHERE { ?item ?p ?value } LIMIT 50 # Remove this line to get the counts
computes in 0.1s
@physikerwelt Perhaps https://portal.mardi4nfdi.de/w/index.php?title=Template%3AStatisticsRow&diff=34172316&oldid=34162067 is what you're after?
Thank you. Works perfect.
Describe the issue
The counters just present values. To understand what was counted the things should be clickable.