Training modules/dashboard/slides/12911-sparql-quiz

This page contains changes which are not marked for translation.


Test yourself!
How do you retrieve information from the Wikidata Query Service?
  1. Type in a question like you would with a search engine. I can type "give me a list of cats", for example. (click to expand or collapse)
    INCORRECT! The query service uses SPARQL, a query language, which means you must use the query language to run a successful query.
  2. I know SQL and that's a query language, so I can use SQL! (click to expand or collapse)
    INCORRECT! Although SQL is a query language, it is not the same as SPARQL, which is what Wikidata Query Service uses to retrieve information from Wikidata.
  3. I need to use SPARQL to write a query using variables, specific properties, and items in the correct syntax. (click to expand or collapse)
    CORRECT! SPARQL is particular and you must express queries explicitly. You can express show me all items that are an instance of a house cat as ?item P31 Q146. Recall that SPARQL syntax also requires a SELECT statement and WHERE clause and prefixes (wdt: for properties and wd: for items), in order for the query to run.
  4. I'll use variables like ?item ?cat ?list. (click to expand or collapse)
    Close! This is starting to look like some SPARQL variables, but SPARQL requires you to be very clear and follow an explicit syntax. Review this training to ensure you understand some basic ways to form queries using SPARQL.

(Discuss this question)