Queries: Difference between revisions
Jump to navigation
Jump to search
Template:Int try it
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
== Federated query with Wikidata == | == Federated query with Wikidata == | ||
# Occupations from SNARC with additional information on Subclass from Wikidata (Library of congress ID from both) | # Occupations from SNARC with additional information on Subclass from Wikidata (Library of congress ID from both) | ||
{{# | {{SPARQL|query=#Returns a list of Wikidata items for a given list of Wikipedia article names | ||
#List of Wikipedia article names (lemma) is like "WIKIPEDIA ARTICLE NAME"@LANGUAGE CODE with de for German, en for English, etc. | |||
#Language version and project is defined in schema:isPartOF with de.wikipedia.org for German Wikipedia, es.wikivoyage for Spanish Wikivoyage, etc. | |||
SELECT ?lemma ?item WHERE { | |||
SELECT | VALUES ?lemma { | ||
"Wikipedia"@de | |||
"Wikidata"@de | |||
"Berlin"@de | |||
? | "Technische Universität Berlin"@de | ||
} | |||
?sitelink schema:about ?item; | |||
schema:isPartOf <https://de.wikipedia.org/>; | |||
schema:name ?lemma. | |||
} | } | ||
}} | }} |
Revision as of 10:52, 26 November 2022
Enghreifftiau o queries a ddefnyddiwyd i dynnu data o'r gronfa / Examples of queries used to extract data from the database
Federated query with Wikidata
- Occupations from SNARC with additional information on Subclass from Wikidata (Library of congress ID from both)
<templatestyles src="SPARQL/styles.css" />
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-0">Script error: No such module "ConcatArgs".</span></strong>