PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?person ?personLabel ?dob WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person p:P69 ?stmt .
  ?stmt ps:P69 wd:Q219563 .
  FILTER NOT EXISTS {
    ?stmt pq:P512 ?degree
  }
  .
  OPTIONAL {
    ?person wdt:P569 ?dob .
  }
  OPTIONAL {
    ?person rdfs:label ?personLabel .
    FILTER ( LANG( ?personLabel ) = "en" )
  }
}
ORDER BY DESC ( ?dob )
LIMIT 500

Using entities:
- University of Washington (wd:Q219563), also known as U-Dub, UDub, University of Washington Seattle, Univ. of Washington, U of W, etc.: is instance of public university / public research university in Seattle, Washington, United States
- human (wd:Q5), also known as human being, humans, individual Homo sapiens, individual human, modern humans, etc.: is instance of class of organisms known by one particular common name / is instance of organisms known by a particular common name / is subclass of mammal / is subclass of natural person / is subclass of omnivore / is subclass of person / is subclass of individual animal / any member of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo, from embryo to adult

Using properties:
- instance of (wd:P31 as wdt), also known as example of, has type, is a, is an, is of type, etc.: that class of which this subject is a particular example and ... a subclass of mountain (and an instance of volcanic landform) / type to which this subject corresponds/belongs. Different ... and the volcano is a type (instance) of volcanic landform
- academic degree (wd:P512 as pq), also known as academic diploma, degree, diploma, P512: academic degree that the person holds / academic degree that the person holds / academic degree that the person holds / academic degree that the person holds
- date of birth (wd:P569 as wdt), also known as birth date, birthdate, birth year, birthyear, born, etc.: is subproperty of date of foundation or creation / is subproperty of inception / date on which the subject was born / date on which the subject was born / date on which the subject was born
- educated at (wd:P69 as p/ps), also known as alma mater, alumna of, alumni of, alumnus of, attended, etc.: is subproperty of affiliation / educational institution attended by subject / educational institution attended by the subject / educational institution attended by the subject

Got 500 rows and 3 columns, showing the first 5 and last 5 rows below:
| person                                         | personLabel                              | dob                                 |
| ---------------------------------------------- | ---------------------------------------- | ----------------------------------- |
| Parker Brailsford (wd:Q124301080)              | Parker Brailsford (lang:en)              | 2003-10-20T00:00:00Z (xsd:dateTime) |
| Rome Odunze (wd:Q114564449)                    | Rome Odunze (lang:en)                    | 2002-06-03T00:00:00Z (xsd:dateTime) |
| Roger Rosengarten (wd:Q124332486)              | Roger Rosengarten (lang:en)              | 2002-01-01T00:00:00Z (xsd:dateTime) |
| Jabbar Muhammad (wd:Q123582942)                | Jabbar Muhammad (lang:en)                | 2001-12-28T00:00:00Z (xsd:dateTime) |
| Jalen McMillan (wd:Q113843993)                 | Jalen McMillan (lang:en)                 | 2001-12-07T00:00:00Z (xsd:dateTime) |
| ...                                            | ...                                      | ...                                 |
| Leslie Denise Pinnel Salisbury (wd:Q102250992) | Leslie Denise Pinnel Salisbury (lang:en) | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Greg Ridgeway (wd:Q23939878)                   | Greg Ridgeway (lang:en)                  | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Thomas Huynh (wd:Q15430457)                    | Thomas Huynh (lang:en)                   | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Joe Puryear (wd:Q16740238)                     | Joe Puryear (lang:en)                    | 1973-01-01T00:00:00Z (xsd:dateTime) |
| JiYeon Choi (wd:Q88374383)                     | JiYeon Choi (lang:en)                    | 1973-01-01T00:00:00Z (xsd:dateTime) |

Answer:
I ran the query above (which selects humans with a p:P69 statement for the University of Washington (wd:Q219563) where that P69 statement does NOT have a pq:P512 (academic degree) qualifier). The query returned 500 results (the LIMIT was reached).

Sample results (most recent dates of birth first) — shown as: <person IRI> — English label — date of birth:
- wd:Q124301080 — Parker Brailsford — 2003-10-20
- wd:Q114564449 — Rome Odunze — 2002-06-03
- wd:Q124332486 — Roger Rosengarten — 2002-01-01
- wd:Q123582942 — Jabbar Muhammad — 2001-12-28
- wd:Q113843993 — Jalen McMillan — 2001-12-07
...
- wd:Q36732172  — Sam Fowler — 2000-08-04
- wd:Q51844693  — Dylan Teves — 2000-05-14
- wd:Q101503854 — Michael Penix Jr. — 2000-05-08
- wd:Q51844693  — Dylan Teves — 2000-05-04
- wd:Q124151317 — Edefuan Ulofoshio — 2000-01-23

Notes and caveats:
- I ensured returned items are humans (wdt:P31 wd:Q5) and used the p:P69 / ps:P69 / pq:P512 pattern to exclude statements with an academic degree qualifier. This excludes only P69 statements that explicitly have a pq:P512 qualifier; if a person has a different P69 statement elsewhere with a pq:P512 qualifier, that does not remove the person unless the specific statement matching ps:P69 wd:Q219563 had the qualifier.
- Some persons may appear multiple times if they have multiple P69 statements for the University of Washington with different statement nodes (this can cause duplicate rows if the query is expanded to include statement-level fields); the SELECT DISTINCT reduces exact duplicates of the (?person, ?personLabel, ?dob) triple but identical persons can still appear if dob differs between statements.
- Many people lack a date of birth in Wikidata; those with missing dob appear at the end of the ordered list.

If you want the full set of 500 rows I can:
- provide them as CSV/TSV/JSON, or
- paste them here (long), or
- refine the query (for example, de-duplicate on ?person or require the P69 statement to be the most recent one, or include occupation/country filters).

Would you like the full 500-row result as a downloadable CSV or pasted here?

I ran the query above (which selects humans with a p:P69 statement for the University of Washington (wd:Q219563) where that P69 statement does NOT have a pq:P512 (academic degree) qualifier). The query returned 500 results (the LIMIT was reached).

Sample results (most recent dates of birth first) — shown as: <person IRI> — English label — date of birth:
- wd:Q124301080 — Parker Brailsford — 2003-10-20
- wd:Q114564449 — Rome Odunze — 2002-06-03
- wd:Q124332486 — Roger Rosengarten — 2002-01-01
- wd:Q123582942 — Jabbar Muhammad — 2001-12-28
- wd:Q113843993 — Jalen McMillan — 2001-12-07
...
- wd:Q36732172  — Sam Fowler — 2000-08-04
- wd:Q51844693  — Dylan Teves — 2000-05-14
- wd:Q101503854 — Michael Penix Jr. — 2000-05-08
- wd:Q51844693  — Dylan Teves — 2000-05-04
- wd:Q124151317 — Edefuan Ulofoshio — 2000-01-23

Notes and caveats:
- I ensured returned items are humans (wdt:P31 wd:Q5) and used the p:P69 / ps:P69 / pq:P512 pattern to exclude statements with an academic degree qualifier. This excludes only P69 statements that explicitly have a pq:P512 qualifier; if a person has a different P69 statement elsewhere with a pq:P512 qualifier, that does not remove the person unless the specific statement matching ps:P69 wd:Q219563 had the qualifier.
- Some persons may appear multiple times if they have multiple P69 statements for the University of Washington with different statement nodes (this can cause duplicate rows if the query is expanded to include statement-level fields); the SELECT DISTINCT reduces exact duplicates of the (?person, ?personLabel, ?dob) triple but identical persons can still appear if dob differs between statements.
- Many people lack a date of birth in Wikidata; those with missing dob appear at the end of the ordered list.

If you want the full set of 500 rows I can:
- provide them as CSV/TSV/JSON, or
- paste them here (long), or
- refine the query (for example, de-duplicate on ?person or require the P69 statement to be the most recent one, or include occupation/country filters).

Would you like the full 500-row result as a downloadable CSV or pasted here?

SPARQL query over wikidata:
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?person ?personLabel ?dob WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person p:P69 ?stmt .
  ?stmt ps:P69 wd:Q219563 .
  FILTER NOT EXISTS {
    ?stmt pq:P512 ?degree
  }
  .
  OPTIONAL {
    ?person wdt:P569 ?dob .
  }
  OPTIONAL {
    ?person rdfs:label ?personLabel .
    FILTER ( LANG( ?personLabel ) = "en" )
  }
}
ORDER BY DESC ( ?dob )
LIMIT 500

Using entities:
- University of Washington (wd:Q219563), also known as U-Dub, UDub, University of Washington Seattle, Univ. of Washington, U of W, etc.: is instance of public university / public research university in Seattle, Washington, United States
- human (wd:Q5), also known as human being, humans, individual Homo sapiens, individual human, modern humans, etc.: is instance of class of organisms known by one particular common name / is instance of organisms known by a particular common name / is subclass of mammal / is subclass of natural person / is subclass of omnivore / is subclass of person / is subclass of individual animal / any member of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo, from embryo to adult

Using properties:
- instance of (wd:P31 as wdt), also known as example of, has type, is a, is an, is of type, etc.: that class of which this subject is a particular example and ... a subclass of mountain (and an instance of volcanic landform) / type to which this subject corresponds/belongs. Different ... and the volcano is a type (instance) of volcanic landform
- academic degree (wd:P512 as pq), also known as academic diploma, degree, diploma, P512: academic degree that the person holds / academic degree that the person holds / academic degree that the person holds / academic degree that the person holds
- date of birth (wd:P569 as wdt), also known as birth date, birthdate, birth year, birthyear, born, etc.: is subproperty of date of foundation or creation / is subproperty of inception / date on which the subject was born / date on which the subject was born / date on which the subject was born
- educated at (wd:P69 as p/ps), also known as alma mater, alumna of, alumni of, alumnus of, attended, etc.: is subproperty of affiliation / educational institution attended by subject / educational institution attended by the subject / educational institution attended by the subject

Execution result:
Got 500 rows and 3 columns, showing the first 5 and last 5 rows below:
| person                                         | personLabel                              | dob                                 |
| ---------------------------------------------- | ---------------------------------------- | ----------------------------------- |
| Parker Brailsford (wd:Q124301080)              | Parker Brailsford (lang:en)              | 2003-10-20T00:00:00Z (xsd:dateTime) |
| Rome Odunze (wd:Q114564449)                    | Rome Odunze (lang:en)                    | 2002-06-03T00:00:00Z (xsd:dateTime) |
| Roger Rosengarten (wd:Q124332486)              | Roger Rosengarten (lang:en)              | 2002-01-01T00:00:00Z (xsd:dateTime) |
| Jabbar Muhammad (wd:Q123582942)                | Jabbar Muhammad (lang:en)                | 2001-12-28T00:00:00Z (xsd:dateTime) |
| Jalen McMillan (wd:Q113843993)                 | Jalen McMillan (lang:en)                 | 2001-12-07T00:00:00Z (xsd:dateTime) |
| ...                                            | ...                                      | ...                                 |
| Leslie Denise Pinnel Salisbury (wd:Q102250992) | Leslie Denise Pinnel Salisbury (lang:en) | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Greg Ridgeway (wd:Q23939878)                   | Greg Ridgeway (lang:en)                  | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Thomas Huynh (wd:Q15430457)                    | Thomas Huynh (lang:en)                   | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Joe Puryear (wd:Q16740238)                     | Joe Puryear (lang:en)                    | 1973-01-01T00:00:00Z (xsd:dateTime) |
| JiYeon Choi (wd:Q88374383)                     | JiYeon Choi (lang:en)                    | 1973-01-01T00:00:00Z (xsd:dateTime) |

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Search for the entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Execute intermediate queries to get feedback and to verify your assumptions. You may need to refine or rethink your current plan based on the query results and go back to step 2 if needed, possibly multiple times.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Available knowledge graphs:
- wikidata at http://localhost:7001 with prefix index for entities and similarity index for properties, and notes:
  - P106 = occupation. Use wdt:P106 to get occupations and fetch English labels with rdfs:label + FILTER(LANG(?label)="en"). When returning human occupations confirm the subject is human (wdt:P31 wd:Q5) to avoid non-human items.
  - Population (P1082) and tabular (P4179): use wdt:P1082 for quick/direct values; for time-series/point-in-time use p:P1082 + ps:P1082 + pq:P585 and ORDER BY pq:P585 DESC. Inspect statement qualifiers (e.g., 'applies to part') and prov:wasDerivedFrom references (pr:P854 etc.) to detect city-proper vs metro/prefecture scopes before using values.
  - Common person properties: P31 (instance of human Q5), P106 (occupation), P569 (date of birth), P19 (place of birth), P27 (country of citizenship), P21 (sex/gender), P166 (award received). Use wdt: for direct values when possible.
  - P17 (country) can be incomplete/misleading for places (historical/overseas tags). To get modern cities in a country combine: instance-of city (P31=Q515) + wdt:P17 OR use wdt:P131* to find an admin parent whose wdt:P17 = the country. Also cross-check coordinates (P625) or admin hierarchy to spot outliers.
  - When filtering by date of birth (P569) use xsd:dateTime comparisons (e.g. >= "1900-01-01T00:00:00Z"^^xsd:dateTime). Be aware many items have year-only or imprecise dates and coverage is biased toward notable/public figures (sportspeople, politicians, artists).
  - To retrieve qualifiers (e.g., award year) use the statement/qualifier pattern: p:Pxxx / ps:Pxxx / pq:P585. Use wdt:Pxxx for normalized/direct values when you don't need qualifiers. Example: p:P166 + pq:P585 gives award year.
  - To get a person's occupations: use wdt:P106 for direct/normalized values and rdfs:label for human-readable names (FILTER(LANG(...))). Example: wd:Q... wdt:P106 ?occ . ?occ rdfs:label ?occLabel . FILTER(LANG(?occLabel)="en").
  - P166 = award received. Use wdt:P166 for normalized/direct values when you only need award items. To get award years or qualifiers use p:P166 / ps:P166 / pq:P585. Many statements lack pq:P585 — use OPTIONAL { ?stmt pq:P585 ?date } and ORDER BY DESC(?date). When listing award winners, filter ?person wdt:P31 wd:Q5 to ensure humans.
  - Population time-series pattern: wd:Q... p:P1082 ?stmt . ?stmt ps:P1082 ?pop . OPTIONAL { ?stmt pq:P585 ?date } . ORDER BY DESC(?date). pq:P585 is the point-in-time qualifier. IMPORTANT: time-series may mix scopes (city proper vs metro) — e.g., Tokyo has a 2016 entry ~38,140,000 likely metro vs smaller city figures. Inspect qualifiers/references for scope before use.
  - Use wdt:P131* to traverse the admin hierarchy and compare wdt:P17 on the place vs an admin parent to detect historical/colonial country assignments. When mismatches appear, inspect the admin parent's instance-of (P31), labels, qualifiers and references to interpret the historical scope.
  - wdt:P106 often yields multiple occupations for a person. Use GROUP_CONCAT(DISTINCT ?occLabel; separator=", ") or return multiple rows. Always fetch labels with rdfs:label + FILTER(LANG(?label)="en") to get readable occupation names.
  - When a search_entity returns multiple hits (person vs sculpture vs memorial), confirm you selected the human/statements by checking wdt:P31 (instance of) and relevant wdt: properties (e.g., wdt:P106). This avoids using a non-human QID by mistake.
  - search_autocomplete can be constrained with a SPARQL pattern containing ?search (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }). Use constraints to focus results (e.g., humans) and avoid ambiguous fallbacks; if it returns no results, fallback to search_entity and verify wdt:P31.
  - Use search_property_of_entity to find relevant properties for an entity (e.g., 'award' -> P166) and search_object_of_property to discover candidate objects (e.g., 'physicist' for P106). This reduces guessing P/Q ids and surfaces qualifiers.
  - Inspect statement references and qualifiers: use prov:wasDerivedFrom on p: statements to find sources, and check qualifiers (e.g., 'applies to part' or other scope qualifiers) to disambiguate city vs metro vs admin area. Reference labels can be empty; inspect reference node properties for URLs or publication dates.

Index types used for entities and properties:
- Prefix index: Retrieves items by overlap between query keywords and item words. The query keywords can match item words exactly or as prefixes.
- Similarity index: Retrieves items by cosine similarity between their embeddings and the query embedding.

General notes across knowledge graphs:
- Use rdfs:label + FILTER(LANG(?label)="en") for labels; avoid SERVICE wikibase:label. Use wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access statement qualifiers (e.g., award year via pq:P585). When dates matter, prefer xsd:dateTime and watch for year-only precision.
- Practical query patterns: use rdfs:label + FILTER(LANG(...)) for labels. Use wdt:Pxxx for direct/normalized values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (dates via pq:P585). For dates use xsd:dateTime and expect year-only precision. For places: combine P17 with P131 or coordinate (P625) filters to avoid historical/overseas mismatches.
- Use OPTIONAL for pq: qualifiers (e.g., pq:P585), sort by qualifier (ORDER BY pq:P585 DESC) to prefer recent values. Use GROUP_CONCAT to combine multiple labels/values in one row. Watch for typed literals (xsd:dateTime, xsd:decimal) when filtering or sorting.
- Before querying, use search_entity to resolve human-friendly names to wd:Q identifiers and verify instance-of (e.g., check wdt:P31 = wd:Q5 for humans) to avoid ambiguous matches. Prefer the top match but programmatically confirm P31 before using its data.
- Use search_property to confirm property identifiers (e.g., "country" -> P17) before embedding them in queries. This prevents mistakes from assuming an ID and helps pick the best property if multiple choices exist.
- search_autocomplete can fall back to an unconstrained search or error when there are too many candidates. If this happens (e.g., "more than the maximum supported number of subject candidates"), retry with narrower constraints such as instance-of (wdt:P31), additional type filters, or short prefixes to reduce the candidate set; otherwise fallback to search_entity and verify wdt:P31.
- Use list(...) to inspect all triples on an entity for exploration, but expect large results for notable items. Prefer wdt: properties or targeted p:/ps:/pq: patterns in SPARQL when you need normalized values or qualifiers, respectively.
- Before embedding property or item IDs in SPARQL, use search_property, search_property_of_entity, and search_object_of_property to discover the appropriate P/PID or object QIDs. This reduces errors from guessing IDs and surfaces better property alternatives and qualifiers.
- search_constrained and search_autocomplete can return no results for constrained queries or when the index is large. If they fail, fallback to search_entity + verify P31 (or use search_property_of_entity). Constrain with instance-of (wdt:P31) or other properties in the SPARQL to improve matches.
- When selecting awards by year, prefer xsd:dateTime range filters (e.g., >= "2001-01-01T00:00:00Z"^^xsd:dateTime && < "2002-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for portability and precision.
- When selecting award winners via wdt:P166, filter ?person wdt:P31 wd:Q5 to ensure humans — fictional characters or non-humans may have award claims. If you need award years use p:P166 / ps:P166 / pq:P585 and OPTIONAL { ?stmt pq:P585 ?year } to retrieve qualifier years.
- Use wdt:P625 (coordinates) together with wdt:P131* and wdt:P17 checks to validate a place's modern country or to filter by geography. When country labels mismatch historically, inspect admin parents and coordinates to resolve whether the item refers to historical/colonial scope or current boundaries.
- Prefer wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (e.g., pq:P585 for award year). Always fetch labels with rdfs:label + FILTER(LANG(?label) = "en").
- If search_autocomplete returns too many candidates or errors, retry with constraints (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }) or narrower query text. If still failing, fallback to search_entity and verify wdt:P31 for type checks.
- For award-year queries use p:P166 / ps:P166 / pq:P585 to access award statements and year qualifiers. Filter by xsd:dateTime ranges (e.g., >= "2020-01-01T00:00:00Z"^^xsd:dateTime && < "2021-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for robustness.
- Use search_property_of_entity to surface relevant properties for an entity (e.g., 'birth' -> P569/P19). list(...) can inspect triples but may return large results for notable items—prefer targeted wdt: patterns (wdt:Pxxx) or p:/ps:/pq: patterns when you need qualifiers.

SPARQL prefixes for use in function calls:
- bd: <http://www.bigdata.com/rdf#
- cc: <http://creativecommons.org/ns#
- data: <https://www.wikidata.org/wiki/Special:EntityData/
- dc: <http://purl.org/dc/elements/1.1/
- dct: <http://purl.org/dc/terms/
- foaf: <http://xmlns.com/foaf/0.1/
- geo: <http://www.opengis.net/ont/geosparql#
- geof: <http://www.opengis.net/def/function/geosparql/
- gn: <http://www.geonames.org/ontology#
- hint: <http://www.bigdata.com/queryHints#
- imdb: <https://www.imdb.com/
- math: <http://www.w3.org/2005/xpath-functions/math#
- ontolex: <http://www.w3.org/ns/lemon/ontolex#
- owl: <http://www.w3.org/2002/07/owl#
- p: <http://www.wikidata.org/prop/
- pq: <http://www.wikidata.org/prop/qualifier/
- pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
- pqv: <http://www.wikidata.org/prop/qualifier/value/
- pr: <http://www.wikidata.org/prop/reference/
- prn: <http://www.wikidata.org/prop/reference/value-normalized/
- prov: <http://www.w3.org/ns/prov#
- prv: <http://www.wikidata.org/prop/reference/value/
- ps: <http://www.wikidata.org/prop/statement/
- psn: <http://www.wikidata.org/prop/statement/value-normalized/
- psv: <http://www.wikidata.org/prop/statement/value/
- qb: <http://purl.org/linked-data/cube#
- qfn: <http://qlever.cs.uni-freiburg.de/function#
- ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
- qlss: <https://qlever.cs.uni-freiburg.de/spatialSearch/
- rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
- rdfs: <http://www.w3.org/2000/01/rdf-schema#
- ref: <http://www.wikidata.org/reference/
- s: <http://www.wikidata.org/entity/statement/
- schema: <http://schema.org/
- skos: <http://www.w3.org/2004/02/skos/core#
- v: <http://www.wikidata.org/value/
- void: <http://rdfs.org/ns/void#
- wd: <http://www.wikidata.org/entity/
- wdno: <http://www.wikidata.org/prop/novalue/
- wdt: <http://www.wikidata.org/prop/direct/
- wdtn: <http://www.wikidata.org/prop/direct-normalized/
- wikibase: <http://wikiba.se/ontology#
- xsd: <http://www.w3.org/2001/XMLSchema#

Additional rules to follow:
- Explain your thought process before and after each step and function call.
- Do not just use or make up entity or property identifiers without verifying their existence in the knowledge graphs first.
- Do not ask the user for clarifications without first attempting to complete the task. If the task input is incomplete or ambiguous, try to make reasonable assumptions and document them.
- Do not use "SERVICE wikibase:label { bd:serviceParam wikibase:language ..." in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.
- Always execute your final SPARQL query before giving an answer to make sure it returns the expected results.
- The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
- Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
- Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
- For questions with a "True" or "False" answer the SPARQL query should be an ASK query.

[User] Who attended the University of Washington but does not have an academic degree qualifier, along with their date of birth if available? Order results in descending order by date of birth, and limit to 500 results.

[Assistant]
Step 1: find the Wikidata item for "University of Washington" and confirm it's the correct university entity. I'll search for the entity now.

Question: University of Washington

Top 10 entity alternatives:
1. University of Washington (wd:Q219563), also known as U-Dub, UDub, University of Washington Seattle, Univ. of Washington, U of W, etc.: public research university in Seattle, Washington, United States / is instance of public university
2. University of Washington (wd:Q7896563), also known as University of Washington station: light rail station in Seattle, Washington / is instance of underground station / is instance of railway station / is instance of streetcar stop / is instance of train station / is instance of tram stop
3. University of Mary Washington (wd:Q657374), also known as Mary Washington College, Mary Washington College of the University of Virginia, State Normal and Industrial School for Woman at Fredericksburg: public liberal arts university in Fredericksburg, Virginia, United States / is instance of public educational institution of the United States / is instance of university
4. Washington Huskies (wd:Q550397, matched via University of Washington athletics), also known as Huskies, University of Washington athletics, University of Washington Huskies, UW Huskies: is instance of university and college sports club / sports program of the University of Washington
5. University of Washington Press (wd:Q3551360), also known as Univ of Washington Pr: is instance of university press / university press
6. UW Tower (wd:Q2944917, matched via University of Washington Plaza), also known as Safeco Building, Safeco Insurance Company Headquarters, Safeco Office Building No. 2, Safeco Plaza, Safeco Tower, etc.: high-rise building in Seattle, Washington, United States / is instance of university building / is instance of office building / is instance of tower block
7. Washington Park Arboretum (wd:Q7972107, matched via University of Washington Arboretum), also known as University of Washington Arboretum, UW Arboretum: arboretum at the University of Washington / is instance of non-profit organisation / is instance of non-profit organization / is instance of nonprofit organization / is instance of botanical garden / is instance of Botanical garden / is instance of research centre / is instance of research center / is instance of park
8. University of Washington Tacoma (wd:Q7896583), also known as tacoma.uw.edu, UWT, UW Tacoma: is instance of public educational institution of the United States / campus of the University of Washington / is instance of public university / is instance of university campus / is instance of branch / is instance of campus
9. Washington Huskies men's basketball (wd:Q7971960, matched via University of Washington basketball), also known as Huskies basketball, Huskies basketball team, Huskies men's basketball, Huskies men's basketball team, U-Dub basketball, etc.: basketball team which represents the University of Washington / is instance of college sports team / is instance of basketball team
10. University of Washington Libraries (wd:Q7896575), also known as UW Libraries: academic and research library system / is instance of academic library / is instance of research library / is instance of publisher

[Assistant]
I'll search for the property that represents the academic degree qualifier (likely "academic degree") so I can filter out statements that include that qualifier.

Question: academic degree

Top 10 property alternatives:
1. academic degree (wd:P512 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as academic diploma, degree, diploma, P512: academic degree that the person holds / academic degree that the person holds / academic degree that the person holds / academic degree that the person holds
2. academic major (wd:P812 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as academic field, academic subject, college major, field of study, major, etc.: major someone studied at college/university / major someone studied at college/university
3. academic minor (wd:P811 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as minor, P811: minor someone studied at college/university
4. educated at (wd:P69 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via graduate of), also known as alma mater, alumna of, alumni of, alumnus of, attended, etc.: educational institution attended by the subject / educational institution attended by the subject / educational institution attended by subject / is subproperty of affiliation
5. conferred by (wd:P1027 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via degree awarded by), also known as awarded by, bestowed by, by, conceded by, degree awarded by, etc.: person or organisation who awards a prize to or bestows an honour upon a recipient / person or organization who grants an award, certification, grant, or role
6. Cambridge Alumni Database ID (wd:P1599 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via ACAD), also known as ACAD, CADB, Venn, P1599: identifier in the Cambridge Alumni Database/Alumni Cantabrigienses (ACAD)
7. field of work (wd:P101 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via academic discipline), also known as academic area, academic discipline, academic subject, activity, activity domain, etc.: specialisation of a person or organisation; see P106 for the occupation / specialization of a person or organization; see P106 for the occupation / specialization of a person or organization; see P106 for the occupation / specialization of a person or organization; see P106 for the occupation / is subproperty of interested in
8. school class (wd:P7174 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via grade), also known as class, cohort, grade, school cohort, stage, etc.: (qualifier) class of a given year/time period to which the person belonged in an educational institution
9. student of (wd:P1066 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via degree supervisor), also known as academic supervisor, advisor, apprentice of, degree advisor, degree supervisor, etc.: is subproperty of significant person / person who has taught this person / person who has taught this person / person who has taught this person
10. end grade (wd:P7095 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as grade to, P7095: highest educational year (aka grade) taught by this institution

[Assistant]
I'll run a SPARQL query that:
- selects humans (?person wdt:P31 wd:Q5);
- finds p:P69 statements where ps:P69 = University of Washington (wd:Q219563);
- excludes those statements that have a pq:P512 (academic degree) qualifier;
- retrieves the person's date of birth if available (wdt:P569) and an English label;
- orders by date of birth descending and limits to 500.

Now I'll execute that query to verify results.

execute

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?person ?personLabel ?dob WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person p:P69 ?stmt .
  ?stmt ps:P69 wd:Q219563 .
  FILTER NOT EXISTS { ?stmt pq:P512 ?degree } .
  OPTIONAL { ?person wdt:P569 ?dob . }
  OPTIONAL { ?person rdfs:label ?personLabel . FILTER(LANG(?personLabel)="en") }
}
ORDER BY DESC(?dob)
LIMIT 500

Got 500 rows and 3 columns, showing the first 5 and last 5 rows below:
| person                                         | personLabel                              | dob                                 |
| ---------------------------------------------- | ---------------------------------------- | ----------------------------------- |
| Parker Brailsford (wd:Q124301080)              | Parker Brailsford (lang:en)              | 2003-10-20T00:00:00Z (xsd:dateTime) |
| Rome Odunze (wd:Q114564449)                    | Rome Odunze (lang:en)                    | 2002-06-03T00:00:00Z (xsd:dateTime) |
| Roger Rosengarten (wd:Q124332486)              | Roger Rosengarten (lang:en)              | 2002-01-01T00:00:00Z (xsd:dateTime) |
| Jabbar Muhammad (wd:Q123582942)                | Jabbar Muhammad (lang:en)                | 2001-12-28T00:00:00Z (xsd:dateTime) |
| Jalen McMillan (wd:Q113843993)                 | Jalen McMillan (lang:en)                 | 2001-12-07T00:00:00Z (xsd:dateTime) |
| ...                                            | ...                                      | ...                                 |
| Leslie Denise Pinnel Salisbury (wd:Q102250992) | Leslie Denise Pinnel Salisbury (lang:en) | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Greg Ridgeway (wd:Q23939878)                   | Greg Ridgeway (lang:en)                  | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Thomas Huynh (wd:Q15430457)                    | Thomas Huynh (lang:en)                   | 1973-01-01T00:00:00Z (xsd:dateTime) |
| Joe Puryear (wd:Q16740238)                     | Joe Puryear (lang:en)                    | 1973-01-01T00:00:00Z (xsd:dateTime) |
| JiYeon Choi (wd:Q88374383)                     | JiYeon Choi (lang:en)                    | 1973-01-01T00:00:00Z (xsd:dateTime) |

[Assistant]
I'll fetch the top 20 rows (the most recent dates of birth) so I can display a concrete sample from the full 500 results.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?person ?personLabel ?dob WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person p:P69 ?stmt .
  ?stmt ps:P69 wd:Q219563 .
  FILTER NOT EXISTS { ?stmt pq:P512 ?degree } .
  OPTIONAL { ?person wdt:P569 ?dob . }
  OPTIONAL { ?person rdfs:label ?personLabel . FILTER(LANG(?personLabel)="en") }
}
ORDER BY DESC(?dob)
LIMIT 20

Got 20 rows and 3 columns, showing the first 5 and last 5 rows below:
| person                            | personLabel                 | dob                                 |
| --------------------------------- | --------------------------- | ----------------------------------- |
| Parker Brailsford (wd:Q124301080) | Parker Brailsford (lang:en) | 2003-10-20T00:00:00Z (xsd:dateTime) |
| Rome Odunze (wd:Q114564449)       | Rome Odunze (lang:en)       | 2002-06-03T00:00:00Z (xsd:dateTime) |
| Roger Rosengarten (wd:Q124332486) | Roger Rosengarten (lang:en) | 2002-01-01T00:00:00Z (xsd:dateTime) |
| Jabbar Muhammad (wd:Q123582942)   | Jabbar Muhammad (lang:en)   | 2001-12-28T00:00:00Z (xsd:dateTime) |
| Jalen McMillan (wd:Q113843993)    | Jalen McMillan (lang:en)    | 2001-12-07T00:00:00Z (xsd:dateTime) |
| ...                               | ...                         | ...                                 |
| Sam Fowler (wd:Q36732172)         | Sam Fowler (lang:en)        | 2000-08-04T00:00:00Z (xsd:dateTime) |
| Dylan Teves (wd:Q51844693)        | Dylan Teves (lang:en)       | 2000-05-14T00:00:00Z (xsd:dateTime) |
| Michael Penix Jr. (wd:Q101503854) | Michael Penix Jr. (lang:en) | 2000-05-08T00:00:00Z (xsd:dateTime) |
| Dylan Teves (wd:Q51844693)        | Dylan Teves (lang:en)       | 2000-05-04T00:00:00Z (xsd:dateTime) |
| Edefuan Ulofoshio (wd:Q124151317) | Edefuan Ulofoshio (lang:en) | 2000-01-23T00:00:00Z (xsd:dateTime) |

[Assistant]
answer

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?person ?personLabel ?dob WHERE {
  ?person wdt:P31 wd:Q5 .
  ?person p:P69 ?stmt .
  ?stmt ps:P69 wd:Q219563 .
  FILTER NOT EXISTS { ?stmt pq:P512 ?degree } .
  OPTIONAL { ?person wdt:P569 ?dob . }
  OPTIONAL { ?person rdfs:label ?personLabel . FILTER(LANG(?personLabel)="en") }
}
ORDER BY DESC(?dob)
LIMIT 500

Answer:
I ran the query above (which selects humans with a p:P69 statement for the University of Washington (wd:Q219563) where that P69 statement does NOT have a pq:P512 (academic degree) qualifier). The query returned 500 results (the LIMIT was reached).

Sample results (most recent dates of birth first) — shown as: <person IRI> — English label — date of birth:
- wd:Q124301080 — Parker Brailsford — 2003-10-20
- wd:Q114564449 — Rome Odunze — 2002-06-03
- wd:Q124332486 — Roger Rosengarten — 2002-01-01
- wd:Q123582942 — Jabbar Muhammad — 2001-12-28
- wd:Q113843993 — Jalen McMillan — 2001-12-07
...
- wd:Q36732172  — Sam Fowler — 2000-08-04
- wd:Q51844693  — Dylan Teves — 2000-05-14
- wd:Q101503854 — Michael Penix Jr. — 2000-05-08
- wd:Q51844693  — Dylan Teves — 2000-05-04
- wd:Q124151317 — Edefuan Ulofoshio — 2000-01-23

Notes and caveats:
- I ensured returned items are humans (wdt:P31 wd:Q5) and used the p:P69 / ps:P69 / pq:P512 pattern to exclude statements with an academic degree qualifier. This excludes only P69 statements that explicitly have a pq:P512 qualifier; if a person has a different P69 statement elsewhere with a pq:P512 qualifier, that does not remove the person unless the specific statement matching ps:P69 wd:Q219563 had the qualifier.
- Some persons may appear multiple times if they have multiple P69 statements for the University of Washington with different statement nodes (this can cause duplicate rows if the query is expanded to include statement-level fields); the SELECT DISTINCT reduces exact duplicates of the (?person, ?personLabel, ?dob) triple but identical persons can still appear if dob differs between statements.
- Many people lack a date of birth in Wikidata; those with missing dob appear at the end of the ordered list.

If you want the full set of 500 rows I can:
- provide them as CSV/TSV/JSON, or
- paste them here (long), or
- refine the query (for example, de-duplicate on ?person or require the P69 statement to be the most recent one, or include occupation/country filters).

Would you like the full 500-row result as a downloadable CSV or pasted here?


PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?itemLabel ?url WHERE {
  ?item wdt:P1630 ?url .
  FILTER ( CONTAINS( LCASE( STR( ?url ) ) , "web.archive.org" ) ) .
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER ( LANG( ?itemLabel ) = "en" )
  }
}
ORDER BY ?item
LIMIT 1000

Using properties:
- formatter URL (wd:P1630 as wdt), also known as URL format string, URL formatter, URL pattern, URL template, P1630: is subproperty of URL / web page URL; URI template from which “$1” can be ... URL changes, add a new statement with preferred rank

Got 243 rows and 3 columns, showing the first 5 and last 5 rows below:
| item         | itemLabel                                                | url                                                                                |
| ------------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| wd:P10043    | Indonesian parliament candidate ID 2019 (lang:en)        | https://web.archive.org/web/https://infopemilu.kpu.go.id/pileg2019/pencalonan/calon/$1   |
| wd:P10116    | Music of Armenia ID (lang:en)                            | https://web.archive.org/web/*/http://musicofarmenia.com/$1                               |
| wd:P1017     | Vatican Library ID (former scheme) (lang:en)             | https://web.archive.org/web/*/https://viaf.org/processed/BAV|$1                          |
| wd:P10348    | USgamer ID (lang:en)                                     | https://web.archive.org/web/2/https://www.usgamer.net/games/$1                           |
| wd:P10379    | dailytelefrag.ru ID (lang:en)                            | https://web.archive.org/web/2/http://www.dailytelefrag.ru/project/info.php?id=$1         |
| ...          | ...                                                      | ...                                                                                |
| wd:P9669     | Israel Olympic Committee athlete ID (archived) (lang:en) | https://web.archive.org/web/202309/https://www.olympicsil.co.il/ספורטאים/$1              |
| wd:P9744     | Steam Greenlight game ID (lang:en)                       | https://web.archive.org/web/0/https://steamcommunity.com/sharedfiles/filedetails/?id=$1  |
| wd:P9822     | TeamNL athlete ID number (archived) (lang:en)            | https://web.archive.org/web/1/https://teamnl.org/sporters/$1-                            |
| wd:Q14937493 | Template:OG (lang:en)                                    | https://web.archive.org/web/20080629134649/http://www.gallifreyone.com/episode.php?id=$1 |
| wd:Q22849881 | Template:OG review (lang:en)                             | http://web.archive.org/web/20080629192600/http://www.gallifreyone.com/review.php?id=$1   |

Answer:
I verified the property for "formatter URL" is P1630, then ran the query above to find items whose formatter URL contains "web.archive.org" (case-insensitive). The query returned 243 rows. Example results (item IRI — English label — formatter URL):
- wd:P10043 — Indonesian parliament candidate ID 2019 — https://web.archive.org/web/https://infopemilu.kpu.go.id/pileg2019/pencalonan/calon/$1
- wd:P10116 — Music of Armenia ID — https://web.archive.org/web/*/http://musicofarmenia.com/$1
- wd:P1017 — Vatican Library ID (former scheme) — https://web.archive.org/web/*/https://viaf.org/processed/BAV|$1
- wd:P10348 — USgamer ID — https://web.archive.org/web/2/https://www.usgamer.net/games/$1
- wd:P10379 — dailytelefrag.ru ID — https://web.archive.org/web/2/http://www.dailytelefrag.ru/project/info.php?id=$1
- wd:P9669 — Israel Olympic Committee athlete ID (archived) — https://web.archive.org/web/202309/https://www.olympicsil.co.il/ספורטאים/$1
- wd:P9744 — Steam Greenlight game ID — https://web.archive.org/web/0/https://steamcommunity.com/sharedfiles/filedetails/?id=$1
- wd:P9822 — TeamNL athlete ID number (archived) — https://web.archive.org/web/1/https://teamnl.org/sporters/$1-
- wd:Q14937493 — Template:OG — https://web.archive.org/web/20080629134649/http://www.gallifreyone.com/episode.php?id=$1
- wd:Q22849881 — Template:OG review — http://web.archive.org/web/20080629192600/http://www.gallifreyone.com/review.php?id=$1

The SPARQL query above returns the item IRIs (and labels when available) along with the formatter URL values; you can run it on Wikidata to retrieve the full list of matching items.

I verified the property for "formatter URL" is P1630, then ran the query above to find items whose formatter URL contains "web.archive.org" (case-insensitive). The query returned 243 rows. Example results (item IRI — English label — formatter URL):
- wd:P10043 — Indonesian parliament candidate ID 2019 — https://web.archive.org/web/https://infopemilu.kpu.go.id/pileg2019/pencalonan/calon/$1
- wd:P10116 — Music of Armenia ID — https://web.archive.org/web/*/http://musicofarmenia.com/$1
- wd:P1017 — Vatican Library ID (former scheme) — https://web.archive.org/web/*/https://viaf.org/processed/BAV|$1
- wd:P10348 — USgamer ID — https://web.archive.org/web/2/https://www.usgamer.net/games/$1
- wd:P10379 — dailytelefrag.ru ID — https://web.archive.org/web/2/http://www.dailytelefrag.ru/project/info.php?id=$1
- wd:P9669 — Israel Olympic Committee athlete ID (archived) — https://web.archive.org/web/202309/https://www.olympicsil.co.il/ספורטאים/$1
- wd:P9744 — Steam Greenlight game ID — https://web.archive.org/web/0/https://steamcommunity.com/sharedfiles/filedetails/?id=$1
- wd:P9822 — TeamNL athlete ID number (archived) — https://web.archive.org/web/1/https://teamnl.org/sporters/$1-
- wd:Q14937493 — Template:OG — https://web.archive.org/web/20080629134649/http://www.gallifreyone.com/episode.php?id=$1
- wd:Q22849881 — Template:OG review — http://web.archive.org/web/20080629192600/http://www.gallifreyone.com/review.php?id=$1

The SPARQL query above returns the item IRIs (and labels when available) along with the formatter URL values; you can run it on Wikidata to retrieve the full list of matching items.

SPARQL query over wikidata:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?itemLabel ?url WHERE {
  ?item wdt:P1630 ?url .
  FILTER ( CONTAINS( LCASE( STR( ?url ) ) , "web.archive.org" ) ) .
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER ( LANG( ?itemLabel ) = "en" )
  }
}
ORDER BY ?item
LIMIT 1000

Using properties:
- formatter URL (wd:P1630 as wdt), also known as URL format string, URL formatter, URL pattern, URL template, P1630: is subproperty of URL / web page URL; URI template from which “$1” can be ... URL changes, add a new statement with preferred rank

Execution result:
Got 243 rows and 3 columns, showing the first 5 and last 5 rows below:
| item         | itemLabel                                                | url                                                                                |
| ------------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| wd:P10043    | Indonesian parliament candidate ID 2019 (lang:en)        | https://web.archive.org/web/https://infopemilu.kpu.go.id/pileg2019/pencalonan/calon/$1   |
| wd:P10116    | Music of Armenia ID (lang:en)                            | https://web.archive.org/web/*/http://musicofarmenia.com/$1                               |
| wd:P1017     | Vatican Library ID (former scheme) (lang:en)             | https://web.archive.org/web/*/https://viaf.org/processed/BAV|$1                          |
| wd:P10348    | USgamer ID (lang:en)                                     | https://web.archive.org/web/2/https://www.usgamer.net/games/$1                           |
| wd:P10379    | dailytelefrag.ru ID (lang:en)                            | https://web.archive.org/web/2/http://www.dailytelefrag.ru/project/info.php?id=$1         |
| ...          | ...                                                      | ...                                                                                |
| wd:P9669     | Israel Olympic Committee athlete ID (archived) (lang:en) | https://web.archive.org/web/202309/https://www.olympicsil.co.il/ספורטאים/$1              |
| wd:P9744     | Steam Greenlight game ID (lang:en)                       | https://web.archive.org/web/0/https://steamcommunity.com/sharedfiles/filedetails/?id=$1  |
| wd:P9822     | TeamNL athlete ID number (archived) (lang:en)            | https://web.archive.org/web/1/https://teamnl.org/sporters/$1-                            |
| wd:Q14937493 | Template:OG (lang:en)                                    | https://web.archive.org/web/20080629134649/http://www.gallifreyone.com/episode.php?id=$1 |
| wd:Q22849881 | Template:OG review (lang:en)                             | http://web.archive.org/web/20080629192600/http://www.gallifreyone.com/review.php?id=$1   |

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Search for the entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Execute intermediate queries to get feedback and to verify your assumptions. You may need to refine or rethink your current plan based on the query results and go back to step 2 if needed, possibly multiple times.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Available knowledge graphs:
- wikidata at http://localhost:7001 with prefix index for entities and similarity index for properties, and notes:
  - P106 = occupation. Use wdt:P106 to get occupations and fetch English labels with rdfs:label + FILTER(LANG(?label)="en"). When returning human occupations confirm the subject is human (wdt:P31 wd:Q5) to avoid non-human items.
  - Population (P1082) and tabular (P4179): use wdt:P1082 for quick/direct values; for time-series/point-in-time use p:P1082 + ps:P1082 + pq:P585 and ORDER BY pq:P585 DESC. Inspect statement qualifiers (e.g., 'applies to part') and prov:wasDerivedFrom references (pr:P854 etc.) to detect city-proper vs metro/prefecture scopes before using values.
  - Common person properties: P31 (instance of human Q5), P106 (occupation), P569 (date of birth), P19 (place of birth), P27 (country of citizenship), P21 (sex/gender), P166 (award received). Use wdt: for direct values when possible.
  - P17 (country) can be incomplete/misleading for places (historical/overseas tags). To get modern cities in a country combine: instance-of city (P31=Q515) + wdt:P17 OR use wdt:P131* to find an admin parent whose wdt:P17 = the country. Also cross-check coordinates (P625) or admin hierarchy to spot outliers.
  - When filtering by date of birth (P569) use xsd:dateTime comparisons (e.g. >= "1900-01-01T00:00:00Z"^^xsd:dateTime). Be aware many items have year-only or imprecise dates and coverage is biased toward notable/public figures (sportspeople, politicians, artists).
  - To retrieve qualifiers (e.g., award year) use the statement/qualifier pattern: p:Pxxx / ps:Pxxx / pq:P585. Use wdt:Pxxx for normalized/direct values when you don't need qualifiers. Example: p:P166 + pq:P585 gives award year.
  - To get a person's occupations: use wdt:P106 for direct/normalized values and rdfs:label for human-readable names (FILTER(LANG(...))). Example: wd:Q... wdt:P106 ?occ . ?occ rdfs:label ?occLabel . FILTER(LANG(?occLabel)="en").
  - P166 = award received. Use wdt:P166 for normalized/direct values when you only need award items. To get award years or qualifiers use p:P166 / ps:P166 / pq:P585. Many statements lack pq:P585 — use OPTIONAL { ?stmt pq:P585 ?date } and ORDER BY DESC(?date). When listing award winners, filter ?person wdt:P31 wd:Q5 to ensure humans.
  - Population time-series pattern: wd:Q... p:P1082 ?stmt . ?stmt ps:P1082 ?pop . OPTIONAL { ?stmt pq:P585 ?date } . ORDER BY DESC(?date). pq:P585 is the point-in-time qualifier. IMPORTANT: time-series may mix scopes (city proper vs metro) — e.g., Tokyo has a 2016 entry ~38,140,000 likely metro vs smaller city figures. Inspect qualifiers/references for scope before use.
  - Use wdt:P131* to traverse the admin hierarchy and compare wdt:P17 on the place vs an admin parent to detect historical/colonial country assignments. When mismatches appear, inspect the admin parent's instance-of (P31), labels, qualifiers and references to interpret the historical scope.
  - wdt:P106 often yields multiple occupations for a person. Use GROUP_CONCAT(DISTINCT ?occLabel; separator=", ") or return multiple rows. Always fetch labels with rdfs:label + FILTER(LANG(?label)="en") to get readable occupation names.
  - When a search_entity returns multiple hits (person vs sculpture vs memorial), confirm you selected the human/statements by checking wdt:P31 (instance of) and relevant wdt: properties (e.g., wdt:P106). This avoids using a non-human QID by mistake.
  - search_autocomplete can be constrained with a SPARQL pattern containing ?search (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }). Use constraints to focus results (e.g., humans) and avoid ambiguous fallbacks; if it returns no results, fallback to search_entity and verify wdt:P31.
  - Use search_property_of_entity to find relevant properties for an entity (e.g., 'award' -> P166) and search_object_of_property to discover candidate objects (e.g., 'physicist' for P106). This reduces guessing P/Q ids and surfaces qualifiers.
  - Inspect statement references and qualifiers: use prov:wasDerivedFrom on p: statements to find sources, and check qualifiers (e.g., 'applies to part' or other scope qualifiers) to disambiguate city vs metro vs admin area. Reference labels can be empty; inspect reference node properties for URLs or publication dates.

Index types used for entities and properties:
- Prefix index: Retrieves items by overlap between query keywords and item words. The query keywords can match item words exactly or as prefixes.
- Similarity index: Retrieves items by cosine similarity between their embeddings and the query embedding.

General notes across knowledge graphs:
- Use rdfs:label + FILTER(LANG(?label)="en") for labels; avoid SERVICE wikibase:label. Use wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access statement qualifiers (e.g., award year via pq:P585). When dates matter, prefer xsd:dateTime and watch for year-only precision.
- Practical query patterns: use rdfs:label + FILTER(LANG(...)) for labels. Use wdt:Pxxx for direct/normalized values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (dates via pq:P585). For dates use xsd:dateTime and expect year-only precision. For places: combine P17 with P131 or coordinate (P625) filters to avoid historical/overseas mismatches.
- Use OPTIONAL for pq: qualifiers (e.g., pq:P585), sort by qualifier (ORDER BY pq:P585 DESC) to prefer recent values. Use GROUP_CONCAT to combine multiple labels/values in one row. Watch for typed literals (xsd:dateTime, xsd:decimal) when filtering or sorting.
- Before querying, use search_entity to resolve human-friendly names to wd:Q identifiers and verify instance-of (e.g., check wdt:P31 = wd:Q5 for humans) to avoid ambiguous matches. Prefer the top match but programmatically confirm P31 before using its data.
- Use search_property to confirm property identifiers (e.g., "country" -> P17) before embedding them in queries. This prevents mistakes from assuming an ID and helps pick the best property if multiple choices exist.
- search_autocomplete can fall back to an unconstrained search or error when there are too many candidates. If this happens (e.g., "more than the maximum supported number of subject candidates"), retry with narrower constraints such as instance-of (wdt:P31), additional type filters, or short prefixes to reduce the candidate set; otherwise fallback to search_entity and verify wdt:P31.
- Use list(...) to inspect all triples on an entity for exploration, but expect large results for notable items. Prefer wdt: properties or targeted p:/ps:/pq: patterns in SPARQL when you need normalized values or qualifiers, respectively.
- Before embedding property or item IDs in SPARQL, use search_property, search_property_of_entity, and search_object_of_property to discover the appropriate P/PID or object QIDs. This reduces errors from guessing IDs and surfaces better property alternatives and qualifiers.
- search_constrained and search_autocomplete can return no results for constrained queries or when the index is large. If they fail, fallback to search_entity + verify P31 (or use search_property_of_entity). Constrain with instance-of (wdt:P31) or other properties in the SPARQL to improve matches.
- When selecting awards by year, prefer xsd:dateTime range filters (e.g., >= "2001-01-01T00:00:00Z"^^xsd:dateTime && < "2002-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for portability and precision.
- When selecting award winners via wdt:P166, filter ?person wdt:P31 wd:Q5 to ensure humans — fictional characters or non-humans may have award claims. If you need award years use p:P166 / ps:P166 / pq:P585 and OPTIONAL { ?stmt pq:P585 ?year } to retrieve qualifier years.
- Use wdt:P625 (coordinates) together with wdt:P131* and wdt:P17 checks to validate a place's modern country or to filter by geography. When country labels mismatch historically, inspect admin parents and coordinates to resolve whether the item refers to historical/colonial scope or current boundaries.
- Prefer wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (e.g., pq:P585 for award year). Always fetch labels with rdfs:label + FILTER(LANG(?label) = "en").
- If search_autocomplete returns too many candidates or errors, retry with constraints (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }) or narrower query text. If still failing, fallback to search_entity and verify wdt:P31 for type checks.
- For award-year queries use p:P166 / ps:P166 / pq:P585 to access award statements and year qualifiers. Filter by xsd:dateTime ranges (e.g., >= "2020-01-01T00:00:00Z"^^xsd:dateTime && < "2021-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for robustness.
- Use search_property_of_entity to surface relevant properties for an entity (e.g., 'birth' -> P569/P19). list(...) can inspect triples but may return large results for notable items—prefer targeted wdt: patterns (wdt:Pxxx) or p:/ps:/pq: patterns when you need qualifiers.

SPARQL prefixes for use in function calls:
- bd: <http://www.bigdata.com/rdf#
- cc: <http://creativecommons.org/ns#
- data: <https://www.wikidata.org/wiki/Special:EntityData/
- dc: <http://purl.org/dc/elements/1.1/
- dct: <http://purl.org/dc/terms/
- foaf: <http://xmlns.com/foaf/0.1/
- geo: <http://www.opengis.net/ont/geosparql#
- geof: <http://www.opengis.net/def/function/geosparql/
- gn: <http://www.geonames.org/ontology#
- hint: <http://www.bigdata.com/queryHints#
- imdb: <https://www.imdb.com/
- math: <http://www.w3.org/2005/xpath-functions/math#
- ontolex: <http://www.w3.org/ns/lemon/ontolex#
- owl: <http://www.w3.org/2002/07/owl#
- p: <http://www.wikidata.org/prop/
- pq: <http://www.wikidata.org/prop/qualifier/
- pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
- pqv: <http://www.wikidata.org/prop/qualifier/value/
- pr: <http://www.wikidata.org/prop/reference/
- prn: <http://www.wikidata.org/prop/reference/value-normalized/
- prov: <http://www.w3.org/ns/prov#
- prv: <http://www.wikidata.org/prop/reference/value/
- ps: <http://www.wikidata.org/prop/statement/
- psn: <http://www.wikidata.org/prop/statement/value-normalized/
- psv: <http://www.wikidata.org/prop/statement/value/
- qb: <http://purl.org/linked-data/cube#
- qfn: <http://qlever.cs.uni-freiburg.de/function#
- ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
- qlss: <https://qlever.cs.uni-freiburg.de/spatialSearch/
- rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
- rdfs: <http://www.w3.org/2000/01/rdf-schema#
- ref: <http://www.wikidata.org/reference/
- s: <http://www.wikidata.org/entity/statement/
- schema: <http://schema.org/
- skos: <http://www.w3.org/2004/02/skos/core#
- v: <http://www.wikidata.org/value/
- void: <http://rdfs.org/ns/void#
- wd: <http://www.wikidata.org/entity/
- wdno: <http://www.wikidata.org/prop/novalue/
- wdt: <http://www.wikidata.org/prop/direct/
- wdtn: <http://www.wikidata.org/prop/direct-normalized/
- wikibase: <http://wikiba.se/ontology#
- xsd: <http://www.w3.org/2001/XMLSchema#

Additional rules to follow:
- Explain your thought process before and after each step and function call.
- Do not just use or make up entity or property identifiers without verifying their existence in the knowledge graphs first.
- Do not ask the user for clarifications without first attempting to complete the task. If the task input is incomplete or ambiguous, try to make reasonable assumptions and document them.
- Do not use "SERVICE wikibase:label { bd:serviceParam wikibase:language ..." in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.
- Always execute your final SPARQL query before giving an answer to make sure it returns the expected results.
- The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
- Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
- Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
- For questions with a "True" or "False" answer the SPARQL query should be an ASK query.

[User] Which items have a formatter URL that includes "web.archive.org"?

[Assistant]
Step 1 — plan: I need to find the property for "formatter URL" and then query items that use that property with an object string containing "web.archive.org". I'll first search for the property identifier for "formatter URL". Then I'll run a SPARQL query listing items with that property whose value contains "web.archive.org". I'll explain my reasoning before each tool call. Now I will search for the property.

Question: formatter URL

Top 10 property alternatives:
1. formatter URL (wd:P1630 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as URL format string, URL formatter, URL pattern, URL template, P1630: web page URL; URI template from which “$1” can be ... URL changes, add a new statement with preferred rank / is subproperty of URL
2. third-party formatter URL (wd:P3303 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via formatter URL for third-party site), also known as 3rd party formatter URL, 3rd-party formatter URL, formatter URL for third-party site, third party formatter URL, P3303: URI template from which "$1" can be automatically replaced ... than the primary issuing body of the identifier concerned / is subproperty of formatter URL
3. formatter URI for RDF resource (wd:P1921 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via formatter URL for RDF resource), also known as formatter URI of the RDF resources, formatter URL for RDF resource, RDF formatter URL, RDF URI template, RDF URL pattern, etc.: formatter URL for RDF resource: URI template from which "$1" ... of the resources, not the URI of the RDF file describing it) / is subproperty of formatter URL
4. embed URL template (wd:P2720 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via formatter URL for embed), also known as embed URL formatter, embed URL pattern, formatter URL for embed, URL template for embed, P2720: formatter URL for embeddable content: URI template from which ... replaced with the effective property value on items / is subproperty of formatter URL
5. API formatter URL (wd:P12605 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via formatter URL for API), also known as formatter URL for API, P12605: URI template from which "$1" can automatically be replaced ... on items; for API access and other machine-readable data / is subproperty of formatter URL
6. location information URL (wd:P12454 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via locator URL), also known as branch finder URL, branch locations URL, branch location URL, location finder URL, locator URL, etc.: URL of a web page providing information on the locations of stores or other physical locations of a brand or operator / is subproperty of URL
7. general property-based URL formatter (wd:P8183 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as P8183: formatter URL to look up information about a class of items ... for issue. Special value {page} for the first value of {P304}
8. search formatter URL (wd:P4354 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as search formatter URI, search pattern, search URI, search URL, P4354: web page search URL; URI template from which "$1" can be ... the string to be searched for. $1 can be whatever you want. / is subproperty of formatter URL
9. service status information URL (wd:P9138 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via status URI), also known as status information URL, status page, status URI, status URL, system status URL, etc.: URI with information about the status of the service / is subproperty of URL
10. user manual URL (wd:P2078 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via manual URL), also known as docs, documentation guide, documentation URL, guide URL, handbook URL, etc.: link to the user manual of the object (product, program) / is subproperty of URL

[Assistant]
Now I'll run a SPARQL query that finds items with the property formatter URL (P1630) whose URL string contains "web.archive.org" (case-insensitive). The query will return the item IRIs, an English label when available, and the URL. I will execute it against Wikidata.

execute

SELECT ?item ?itemLabel ?url WHERE {
  ?item wdt:P1630 ?url .
  FILTER(CONTAINS(LCASE(STR(?url)), "web.archive.org")) .
  OPTIONAL { ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }
}
ORDER BY ?item
LIMIT 1000

Got 243 rows and 3 columns, showing the first 5 and last 5 rows below:
| item         | itemLabel                                                | url                                                                                |
| ------------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| wd:P10043    | Indonesian parliament candidate ID 2019 (lang:en)        | https://web.archive.org/web/https://infopemilu.kpu.go.id/pileg2019/pencalonan/calon/$1   |
| wd:P10116    | Music of Armenia ID (lang:en)                            | https://web.archive.org/web/*/http://musicofarmenia.com/$1                               |
| wd:P1017     | Vatican Library ID (former scheme) (lang:en)             | https://web.archive.org/web/*/https://viaf.org/processed/BAV|$1                          |
| wd:P10348    | USgamer ID (lang:en)                                     | https://web.archive.org/web/2/https://www.usgamer.net/games/$1                           |
| wd:P10379    | dailytelefrag.ru ID (lang:en)                            | https://web.archive.org/web/2/http://www.dailytelefrag.ru/project/info.php?id=$1         |
| ...          | ...                                                      | ...                                                                                |
| wd:P9669     | Israel Olympic Committee athlete ID (archived) (lang:en) | https://web.archive.org/web/202309/https://www.olympicsil.co.il/ספורטאים/$1              |
| wd:P9744     | Steam Greenlight game ID (lang:en)                       | https://web.archive.org/web/0/https://steamcommunity.com/sharedfiles/filedetails/?id=$1  |
| wd:P9822     | TeamNL athlete ID number (archived) (lang:en)            | https://web.archive.org/web/1/https://teamnl.org/sporters/$1-                            |
| wd:Q14937493 | Template:OG (lang:en)                                    | https://web.archive.org/web/20080629134649/http://www.gallifreyone.com/episode.php?id=$1 |
| wd:Q22849881 | Template:OG review (lang:en)                             | http://web.archive.org/web/20080629192600/http://www.gallifreyone.com/review.php?id=$1   |

[Assistant]
Explaining my final step: I will provide the final SPARQL query I executed and a short summary of the results (count and example rows shown). Then I'll finalize with the functions.answer call.

answer

SELECT ?item ?itemLabel ?url WHERE {
  ?item wdt:P1630 ?url .
  FILTER(CONTAINS(LCASE(STR(?url)), "web.archive.org")) .
  OPTIONAL { ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }
}
ORDER BY ?item
LIMIT 1000

Answer:
I verified the property for "formatter URL" is P1630, then ran the query above to find items whose formatter URL contains "web.archive.org" (case-insensitive). The query returned 243 rows. Example results (item IRI — English label — formatter URL):
- wd:P10043 — Indonesian parliament candidate ID 2019 — https://web.archive.org/web/https://infopemilu.kpu.go.id/pileg2019/pencalonan/calon/$1
- wd:P10116 — Music of Armenia ID — https://web.archive.org/web/*/http://musicofarmenia.com/$1
- wd:P1017 — Vatican Library ID (former scheme) — https://web.archive.org/web/*/https://viaf.org/processed/BAV|$1
- wd:P10348 — USgamer ID — https://web.archive.org/web/2/https://www.usgamer.net/games/$1
- wd:P10379 — dailytelefrag.ru ID — https://web.archive.org/web/2/http://www.dailytelefrag.ru/project/info.php?id=$1
- wd:P9669 — Israel Olympic Committee athlete ID (archived) — https://web.archive.org/web/202309/https://www.olympicsil.co.il/ספורטאים/$1
- wd:P9744 — Steam Greenlight game ID — https://web.archive.org/web/0/https://steamcommunity.com/sharedfiles/filedetails/?id=$1
- wd:P9822 — TeamNL athlete ID number (archived) — https://web.archive.org/web/1/https://teamnl.org/sporters/$1-
- wd:Q14937493 — Template:OG — https://web.archive.org/web/20080629134649/http://www.gallifreyone.com/episode.php?id=$1
- wd:Q22849881 — Template:OG review — http://web.archive.org/web/20080629192600/http://www.gallifreyone.com/review.php?id=$1

The SPARQL query above returns the item IRIs (and labels when available) along with the formatter URL values; you can run it on Wikidata to retrieve the full list of matching items.