Project:SPARQL/examples: Difference between revisions
Jump to navigation
Jump to search
Tdkiv-admin (talk | contribs) No edit summary |
Tdkiv-admin (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
PREFIX zwb: <https://tdkiv.wikibase.cloud/entity/> | PREFIX zwb: <https://tdkiv.wikibase.cloud/entity/> | ||
PREFIX zdp: <https://tdkiv.wikibase.cloud/prop/direct/> | PREFIX zdp: <https://tdkiv.wikibase.cloud/prop/direct/> | ||
PREFIX | PREFIX wikibase: <http://wikiba.se/ontology#> | ||
PREFIX | PREFIX bd: <http://www.bigdata.com/rdf#> | ||
SELECT ?item ?itemLabel ?vyklad WHERE { | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "cs,en". } | |||
?item zdp:P16 zwb:Q4397; | |||
zdp:P1 ?vyklad. | |||
} | |||
ORDER BY (?itemLabel)</sparql> | |||
===Počty citací použitých zdrojů=== | |||
===Počty citací zdrojů | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
#defaultView:BubbleChart | #defaultView:BubbleChart |
Revision as of 19:05, 26 September 2024
Vzorové dotazy
Všechny pojmy s výkladem
PREFIX zwb: <https://tdkiv.wikibase.cloud/entity/>
PREFIX zdp: <https://tdkiv.wikibase.cloud/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?vyklad WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "cs,en". }
?item zdp:P16 zwb:Q4397;
zdp:P1 ?vyklad.
}
ORDER BY (?itemLabel)
Počty citací použitých zdrojů
#defaultView:BubbleChart
PREFIX zp: <https://tdkiv.wikibase.cloud/prop/>
PREFIX zps: <https://tdkiv.wikibase.cloud/prop/statement/>
PREFIX zpr: <https://tdkiv.wikibase.cloud/prop/reference/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX prov: <http://www.w3.org/ns/prov#>
SELECT ?zdroj ?stitek (COUNT(?zdroj) AS ?pocet_citaci) WHERE {
?item zp:P1 ?vykladstatement.
?vykladstatement zps:P1 ?vyklad;
prov:wasDerivedFrom ?ref.
?ref zpr:P22 ?zdroj.
OPTIONAL {
?zdroj rdfs:label ?zdrojLabel.
FILTER((LANG(?zdrojLabel)) = "cs")
}
OPTIONAL {
?zdroj owl:sameAs ?presmerovany_zdroj.
?presmerovany_zdroj rdfs:label ?presmerovany_label.
}
BIND(IF(BOUND(?presmerovany_label), ?presmerovany_label, ?zdrojLabel) AS ?stitek)
}
GROUP BY ?zdroj ?zdrojLabel ?presmerovany_zdroj ?presmerovany_label ?stitek
ORDER BY DESC (?pocet_citaci)