PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?work ?workLabel ?type ?typeLabel ?pubdate ?isbn WHERE {
  VALUES ?author {
    wd:Q35610
  }
  ?work wdt:P50 ?author .
  ?work wdt:P31 ?type .
  FILTER ( ?type IN ( wd:Q571 , wd:Q8261 , wd:Q1279564 , wd:Q7725634 , wd:Q47461344 ) ) OPTIONAL {
    ?work rdfs:label ?workLabel .
    FILTER ( LANG( ?workLabel ) = "en" )
  }
  OPTIONAL {
    ?type rdfs:label ?typeLabel .
    FILTER ( LANG( ?typeLabel ) = "en" )
  }
  OPTIONAL {
    ?work wdt:P577 ?pubdate .
  }
  OPTIONAL {
    ?work wdt:P212 ?isbn .
  }
  FILTER ( ( ?type IN ( wd:Q571 , wd:Q8261 , wd:Q1279564 ) || bound( ?isbn ) || bound( ?pubdate ) || EXISTS {
    ?work wdt:P123 ?publisher
  }
  ) && NOT EXISTS {
    ?work wdt:P31 / wdt:P279 * wd:Q3331189
  }
  && bound( ?workLabel ) )
}
ORDER BY ?workLabel

Using entities:
- short story collection (wd:Q1279564), also known as collection of short stories, collection of short works, group of short stories, volume of short stories: is instance of literary form / is subclass of collection of literary works / is subclass of publication / is subclass of serial / is subclass of literary work / is subclass of series of creative works / book containing several short stories by a single author
- version, edition or translation (wd:Q3331189), also known as edition, expression, issue, translation, version, etc.: is instance of item / is instance of second-order class / is subclass of publication / is subclass of class / specific version of a work, resulting from its edition, ... or translation; set of substantially similar copies of a work
- Arthur Conan Doyle (wd:Q35610), also known as Arthur Conan, Sir Doyle, Arthur Ignatius Conan Doyle, Conan Doyle, Sir A. Conan Doyle, Sir Arthur Conan Doyle, etc.: has occupation screenwriter / has occupation novelist / has occupation physician writer / has occupation children's writer / has occupation physician / has occupation writer / has occupation crime fiction writer / has occupation playwright / has occupation historian / has occupation science fiction writer / has occupation short story writer / has occupation essayist / is instance of human / British writer and physician (1859–1930) / Scottish physician and author
- written work (wd:Q47461344), also known as creative written work, written delivery: is instance of collective noun / is instance of Collective noun / is subclass of intellectual work / any work expressed in writing, such as inscriptions, manuscripts, documents or maps / any work expressed in writing, such as inscriptions, manuscripts, documents or maps
- book (wd:Q571): is instance of type of mass media / is instance of type of publication / is subclass of publication / is subclass of document / is subclass of medium / is subclass of communication medium / is subclass of Product / is subclass of product / medium for recording information (words or images) typically on bound pages or more abstractly in electronic or audio form / written text that can be published in printed or electronic form
- literary work (wd:Q7725634), also known as literary text, work in literature: is subclass of type of work / is subclass of written work / is subclass of creative work / creative work by a writer created with aesthetic, academic or recreative purposes / written work read for enjoyment or edification
- novel (wd:Q8261), also known as novels: is instance of literary form / is subclass of narration / is subclass of work of fiction / narrative text, normally of a substantial length and in the form of prose describing a fictional and sequential story

Using properties:
- publisher (wd:P123 as wdt), also known as board game publisher, book publisher, comic book publisher, comic publisher, music publisher, etc.: organisation or person responsible for publishing books, periodicals, games or software / organization or person responsible for publishing books, periodicals, games or software / organization or person responsible for publishing books, periodicals, printed music, podcasts, games or software
- ISBN-13 (wd:P212 as wdt), also known as 978, Bookland, International Standard Book Number-13, isbn, isbn-13, etc.: is subproperty of Global Trade Item Number / identifier for a book (edition), thirteen digit / International Standard Book Number, thirteen digit variant.
- subclass of (wd:P279 as wdt), also known as all members of this class also belong to, category of, form of, has superclass, is a class of, etc.: this item is a subclass (subset) of that item; ALL instances ... of volcanic landform); Everest is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain
- 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
- author (wd:P50 as wdt), also known as co-author, creator, maker, playwright, poet, etc.: is subproperty of creator / main creator(s) of a written work (use on works, not humans) / main creator(s) of a written work (use on works, not humans) / main creator(s) of a written work (use on works, not humans); ... name string) when Wikidata item is unknown or does not exist
- publication date (wd:P577 as wdt), also known as air date, airdate, be published during, be published in, broadcast date, etc.: is subproperty of point in time / date or point in time a work is first published or released / date or point in time a work is first published or released / date or point in time when a work was first published or released

Got 145 rows and 6 columns, showing the first 5 and last 5 rows below:
| work                                                 | workLabel                                      | type                        | typeLabel               | pubdate                             | isbn |
| ---------------------------------------------------- | ---------------------------------------------- | --------------------------- | ----------------------- | ----------------------------------- | ---- |
| A Case of Identity (wd:Q1151528)                     | A Case of Identity (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1891-09-01T00:00:00Z (xsd:dateTime) |      |
| A Duet with an Occational Chorus (wd:Q124080746)     | A Duet with an Occational Chorus (lang:en)     | literary work (wd:Q7725634) | literary work (lang:en) | 1899-01-01T00:00:00Z (xsd:dateTime) |      |
| A Medical Document (wd:Q61958955)                    | A Medical Document (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1919-01-01T00:00:00Z (xsd:dateTime) |      |
| An Actor's Duel and The Winning Shot (wd:Q124081490) | An Actor's Duel and The Winning Shot (lang:en) | literary work (wd:Q7725634) | literary work (lang:en) | 1894-01-01T00:00:00Z (xsd:dateTime) |      |
| An Exciting Christmas Eve (wd:Q52780178)             | An Exciting Christmas Eve (lang:en)            | literary work (wd:Q7725634) | literary work (lang:en) | 1883-12-01T00:00:00Z (xsd:dateTime) |      |
| ...                                                  | ...                                            | ...                         | ...                     | ...                                 | ...  |
| The White Company (wd:Q2297190)                      | The White Company (lang:en)                    | written work (wd:Q47461344) | written work (lang:en)  | 1891-01-01T00:00:00Z (xsd:dateTime) |      |
| Through the Magic Door (wd:Q121817887)               | Through the Magic Door (lang:en)               | literary work (wd:Q7725634) | literary work (lang:en) | 1907-01-01T00:00:00Z (xsd:dateTime) |      |
| Uncle Bernac (wd:Q48748249)                          | Uncle Bernac (lang:en)                         | literary work (wd:Q7725634) | literary work (lang:en) | 1897-01-01T00:00:00Z (xsd:dateTime) |      |
| When the World Screamed (wd:Q2563966)                | When the World Screamed (lang:en)              | literary work (wd:Q7725634) | literary work (lang:en) | 1928-01-01T00:00:00Z (xsd:dateTime) |      |
| Your Share of Fear (wd:Q17630018)                    | Your Share of Fear (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1987-01-01T00:00:00Z (xsd:dateTime) |      |

Answer:
I ran a Wikidata query that returns items with P50 = Arthur Conan Doyle (wd:Q35610) and filters for items that are likely books (instance-of common book/novel/collection types, or have publication metadata), while excluding translations/editions. The query returned 145 works matching those criteria.

Examples of books by Arthur Conan Doyle found in the results (with their Wikidata Q-IDs):
- A Study in Scarlet (wd:Q223131)
- The Sign of the Four (wd:Q78629473)
- The Hound of the Baskervilles (wd:Q45192)  [there is also another item wd:Q120490748]
- The Valley of Fear (wd:Q863438)
- The Lost World (wd:Q785255)
- The White Company (wd:Q2297190)

If you want the full list (all 145 items), I can return the complete result set (labels and QIDs), or export it as CSV/JSON. You can also further narrow the query (e.g., only novels, only works with ISBNs, or only Sherlock Holmes books).

I ran a Wikidata query that returns items with P50 = Arthur Conan Doyle (wd:Q35610) and filters for items that are likely books (instance-of common book/novel/collection types, or have publication metadata), while excluding translations/editions. The query returned 145 works matching those criteria.

Examples of books by Arthur Conan Doyle found in the results (with their Wikidata Q-IDs):
- A Study in Scarlet (wd:Q223131)
- The Sign of the Four (wd:Q78629473)
- The Hound of the Baskervilles (wd:Q45192)  [there is also another item wd:Q120490748]
- The Valley of Fear (wd:Q863438)
- The Lost World (wd:Q785255)
- The White Company (wd:Q2297190)

If you want the full list (all 145 items), I can return the complete result set (labels and QIDs), or export it as CSV/JSON. You can also further narrow the query (e.g., only novels, only works with ISBNs, or only Sherlock Holmes books).

SPARQL query over wikidata:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?work ?workLabel ?type ?typeLabel ?pubdate ?isbn WHERE {
  VALUES ?author {
    wd:Q35610
  }
  ?work wdt:P50 ?author .
  ?work wdt:P31 ?type .
  FILTER ( ?type IN ( wd:Q571 , wd:Q8261 , wd:Q1279564 , wd:Q7725634 , wd:Q47461344 ) ) OPTIONAL {
    ?work rdfs:label ?workLabel .
    FILTER ( LANG( ?workLabel ) = "en" )
  }
  OPTIONAL {
    ?type rdfs:label ?typeLabel .
    FILTER ( LANG( ?typeLabel ) = "en" )
  }
  OPTIONAL {
    ?work wdt:P577 ?pubdate .
  }
  OPTIONAL {
    ?work wdt:P212 ?isbn .
  }
  FILTER ( ( ?type IN ( wd:Q571 , wd:Q8261 , wd:Q1279564 ) || bound( ?isbn ) || bound( ?pubdate ) || EXISTS {
    ?work wdt:P123 ?publisher
  }
  ) && NOT EXISTS {
    ?work wdt:P31 / wdt:P279 * wd:Q3331189
  }
  && bound( ?workLabel ) )
}
ORDER BY ?workLabel

Using entities:
- short story collection (wd:Q1279564), also known as collection of short stories, collection of short works, group of short stories, volume of short stories: is instance of literary form / is subclass of collection of literary works / is subclass of publication / is subclass of serial / is subclass of literary work / is subclass of series of creative works / book containing several short stories by a single author
- version, edition or translation (wd:Q3331189), also known as edition, expression, issue, translation, version, etc.: is instance of item / is instance of second-order class / is subclass of publication / is subclass of class / specific version of a work, resulting from its edition, ... or translation; set of substantially similar copies of a work
- Arthur Conan Doyle (wd:Q35610), also known as Arthur Conan, Sir Doyle, Arthur Ignatius Conan Doyle, Conan Doyle, Sir A. Conan Doyle, Sir Arthur Conan Doyle, etc.: has occupation screenwriter / has occupation novelist / has occupation physician writer / has occupation children's writer / has occupation physician / has occupation writer / has occupation crime fiction writer / has occupation playwright / has occupation historian / has occupation science fiction writer / has occupation short story writer / has occupation essayist / is instance of human / British writer and physician (1859–1930) / Scottish physician and author
- written work (wd:Q47461344), also known as creative written work, written delivery: is instance of collective noun / is instance of Collective noun / is subclass of intellectual work / any work expressed in writing, such as inscriptions, manuscripts, documents or maps / any work expressed in writing, such as inscriptions, manuscripts, documents or maps
- book (wd:Q571): is instance of type of mass media / is instance of type of publication / is subclass of publication / is subclass of document / is subclass of medium / is subclass of communication medium / is subclass of Product / is subclass of product / medium for recording information (words or images) typically on bound pages or more abstractly in electronic or audio form / written text that can be published in printed or electronic form
- literary work (wd:Q7725634), also known as literary text, work in literature: is subclass of type of work / is subclass of written work / is subclass of creative work / creative work by a writer created with aesthetic, academic or recreative purposes / written work read for enjoyment or edification
- novel (wd:Q8261), also known as novels: is instance of literary form / is subclass of narration / is subclass of work of fiction / narrative text, normally of a substantial length and in the form of prose describing a fictional and sequential story

Using properties:
- publisher (wd:P123 as wdt), also known as board game publisher, book publisher, comic book publisher, comic publisher, music publisher, etc.: organisation or person responsible for publishing books, periodicals, games or software / organization or person responsible for publishing books, periodicals, games or software / organization or person responsible for publishing books, periodicals, printed music, podcasts, games or software
- ISBN-13 (wd:P212 as wdt), also known as 978, Bookland, International Standard Book Number-13, isbn, isbn-13, etc.: is subproperty of Global Trade Item Number / identifier for a book (edition), thirteen digit / International Standard Book Number, thirteen digit variant.
- subclass of (wd:P279 as wdt), also known as all members of this class also belong to, category of, form of, has superclass, is a class of, etc.: this item is a subclass (subset) of that item; ALL instances ... of volcanic landform); Everest is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain
- 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
- author (wd:P50 as wdt), also known as co-author, creator, maker, playwright, poet, etc.: is subproperty of creator / main creator(s) of a written work (use on works, not humans) / main creator(s) of a written work (use on works, not humans) / main creator(s) of a written work (use on works, not humans); ... name string) when Wikidata item is unknown or does not exist
- publication date (wd:P577 as wdt), also known as air date, airdate, be published during, be published in, broadcast date, etc.: is subproperty of point in time / date or point in time a work is first published or released / date or point in time a work is first published or released / date or point in time when a work was first published or released

Execution result:
Got 145 rows and 6 columns, showing the first 5 and last 5 rows below:
| work                                                 | workLabel                                      | type                        | typeLabel               | pubdate                             | isbn |
| ---------------------------------------------------- | ---------------------------------------------- | --------------------------- | ----------------------- | ----------------------------------- | ---- |
| A Case of Identity (wd:Q1151528)                     | A Case of Identity (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1891-09-01T00:00:00Z (xsd:dateTime) |      |
| A Duet with an Occational Chorus (wd:Q124080746)     | A Duet with an Occational Chorus (lang:en)     | literary work (wd:Q7725634) | literary work (lang:en) | 1899-01-01T00:00:00Z (xsd:dateTime) |      |
| A Medical Document (wd:Q61958955)                    | A Medical Document (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1919-01-01T00:00:00Z (xsd:dateTime) |      |
| An Actor's Duel and The Winning Shot (wd:Q124081490) | An Actor's Duel and The Winning Shot (lang:en) | literary work (wd:Q7725634) | literary work (lang:en) | 1894-01-01T00:00:00Z (xsd:dateTime) |      |
| An Exciting Christmas Eve (wd:Q52780178)             | An Exciting Christmas Eve (lang:en)            | literary work (wd:Q7725634) | literary work (lang:en) | 1883-12-01T00:00:00Z (xsd:dateTime) |      |
| ...                                                  | ...                                            | ...                         | ...                     | ...                                 | ...  |
| The White Company (wd:Q2297190)                      | The White Company (lang:en)                    | written work (wd:Q47461344) | written work (lang:en)  | 1891-01-01T00:00:00Z (xsd:dateTime) |      |
| Through the Magic Door (wd:Q121817887)               | Through the Magic Door (lang:en)               | literary work (wd:Q7725634) | literary work (lang:en) | 1907-01-01T00:00:00Z (xsd:dateTime) |      |
| Uncle Bernac (wd:Q48748249)                          | Uncle Bernac (lang:en)                         | literary work (wd:Q7725634) | literary work (lang:en) | 1897-01-01T00:00:00Z (xsd:dateTime) |      |
| When the World Screamed (wd:Q2563966)                | When the World Screamed (lang:en)              | literary work (wd:Q7725634) | literary work (lang:en) | 1928-01-01T00:00:00Z (xsd:dateTime) |      |
| Your Share of Fear (wd:Q17630018)                    | Your Share of Fear (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1987-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] Which books were authored by Arthur Conan Doyle?

[Assistant]
Step 1 — find the Wikidata item for "Arthur Conan Doyle" (confirm it's a human)
I'll search the entity index for "Arthur Conan Doyle" and then verify it's an instance of human (wd:Q5).

Question: Arthur Conan Doyle

Top 10 entity alternatives:
1. Arthur Conan Doyle (wd:Q35610), also known as Arthur Conan, Sir Doyle, Arthur Ignatius Conan Doyle, Conan Doyle, Sir A. Conan Doyle, Sir Arthur Conan Doyle, etc.: British writer and physician (1859–1930) / has occupation science fiction writer / has occupation crime fiction writer / has occupation short story writer / has occupation children's writer / has occupation physician writer / Scottish physician and author / has occupation screenwriter / has occupation playwright / has occupation physician / has occupation historian / has occupation novelist / has occupation essayist / has occupation writer / is instance of human
2. Arthur Conan Doyle (wd:Q13471093): is instance of film / 1927 film
3. Arthur Conan Doyle (wd:Q28051383): painting by Henry L. Gates / painting by Henry L. Gates / is instance of painting
4. Arthur Conan Doyle (wd:Q61773675): is instance of scholarly article / is instance of academic article
5. Arthur Conan Doyle. (wd:Q52488757): scientific article published in January 1960 / scientific article published in January 1960 / scientific article published in January 1960 / is instance of scholarly article / is instance of academic article
6. Arthur Conan Doyle (wd:Q52417813): scientific article published in November 1980 / scientific article published in November 1980 / scientific article published in November 1980 / is instance of scholarly article / is instance of academic article
7. Arthur conan doyle (wd:Q85135559): scientific article published on 01 September 1991 / is instance of scholarly article / is instance of academic article
8. Arthur Conan Doyle bibliography (wd:Q4798323): list of works of Sir Arthur Conan Doyle / is instance of bibliography
9. Sir Arthur Conan Doyle (wd:Q52490062): is instance of scholarly article / is instance of academic article / scientific article
10. Statue of Arthur Conan Doyle (wd:Q56295036): statue in Crowborough, East Sussex, England, UK / is instance of statue

[Assistant]
Next I'll list some triples for wd:Q35610 to confirm it's a human (wdt:P31 = wd:Q5) and to inspect available properties. I'll request triples with subject wd:Q35610.

list

wd:Q35610

Got 1,573 rows and 3 columns, showing the first 10 rows below:
| subject                        | property                         | object                                                                                |
| ------------------------------ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Arthur Conan Doyle (wd:Q35610) | instance of (wdt:P31)            | human (wd:Q5)                                                                                |
| Arthur Conan Doyle (wd:Q35610) | occupation (wdt:P106)            | crime fiction writer (wd:Q10297252)                                                                                |
| Arthur Conan Doyle (wd:Q35610) | sex or gender (wdt:P21)          | male (wd:Q6581097)                                                                                |
| Arthur Conan Doyle (wd:Q35610) | given name (wdt:P735)            | Arthur (wd:Q1778168)                                                                                |
| Arthur Conan Doyle (wd:Q35610) | date of birth (wdt:P569)         | 1859-05-22T00:00:00Z (xsd:dateTime)                                                                                |
| Arthur Conan Doyle (wd:Q35610) | Commons category (wdt:P373)      | Arthur Conan Doyle                                                                                |
| Arthur Conan Doyle (wd:Q35610) | image (wdt:P18)                  | <http://commons.wikimedia.org/wiki/Special:FilePath/Arthur%20Conan%20Doyle%20by%20Walter%20Benington%2C%201914.png> |
| Arthur Conan Doyle (wd:Q35610) | family name (wdt:P734)           | Doyle (wd:Q11825166)                                                                                |
| Arthur Conan Doyle (wd:Q35610) | country of citizenship (wdt:P27) | United Kingdom (wd:Q145)                                                                                |
| Arthur Conan Doyle (wd:Q35610) | Freebase ID (wdt:P646)           | /m/0ky1                                                                                |
| ...                            | ...                              | ...                                                                                |

[Assistant]
Now I'll search for the property used for "author" on Wikidata (to confirm its property id, typically P50).

Question: author

Top 10 property alternatives:
1. theorized by (wd:P8403 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via author), also known as author, authored by, defined by, explained by, named by, etc.: subject who suggested or proposed this concept or immaterial invention / subject who suggested or proposed this concept or immaterial invention
2. lyricist (wd:P676 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via author), also known as author, lyrics by, songwriter, text author, text by, etc.: author of song lyrics; also use P86 for music composer / is subproperty of author / author of song lyrics
3. author (wd:P50 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as co-author, creator, maker, playwright, poet, etc.: main creator(s) of a written work (use on works, not humans); ... name string) when Wikidata item is unknown or does not exist / main creator(s) of a written work (use on works, not humans) / main creator(s) of a written work (use on works, not humans) / is subproperty of creator
4. perpetrator (wd:P8031 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via material author), also known as accomplice, agressor, assailant, assassin, attacker, etc.: person or organization who carried out this harmful, illegal, or immoral act / is subproperty of participant
5. notable work (wd:P800 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via author of), also known as artwork, author of, bibliography, books by, creator of, etc.: notable scientific, artistic or literary work, or other work of significance among subject's works / notable scientific, artistic or literary work, or other work of significance among subject's works
6. has sorting (wd:P8307 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via by), also known as by, order, ordering, sort, sorted by, etc.: entries are sorted by this in the appendix, list or table
7. criterion used (wd:P1013 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via by), also known as according to, based on criteria, based on criterion, basis, by, etc.: property by which a distinction or classification is made / property by which a distinction or classification is made / property by which a distinction or classification is made
8. conferred by (wd:P1027 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via 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
9. creator (wd:P170 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via by), also known as art by, artist (non-musical), art work by, artwork by, by, etc.: maker of this creative work or other object (where no more specific property exists) / maker of this creative work or other object (where no more specific property exists) / maker of a creative work or other object (where no more specific property exists)
10. author name string (wd:P2093 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via writer name), also known as author indicated as, author named as, author string, byline, creator indicated as, etc.: stores unspecified author or editor name for publications; ... editor (P98) does not exist or is not known. Do not use both. / stores unspecified author or editor name for publications; ... author (P50) or editor (P98) does not exist or is not known / string to store unspecified author name for publications; use if Wikidata item for author (P50) does not exist or is not known

[Assistant]
I'll check whether "novel" (wd:Q8261) is a subclass of "book" (wd:Q571) — if so, filtering by subclass-of book will include novels. I'll run an ASK query for that.

execute

ASK WHERE { wd:Q8261 wdt:P279* wd:Q571 . }

[Assistant]
I'll search for the entity "short story collection" to get its Q-id so I can include it in the class filter.

Question: short story collection

Top 10 entity alternatives:
1. short story collection (wd:Q1279564), also known as collection of short stories, collection of short works, group of short stories, volume of short stories: book containing several short stories by a single author / is subclass of collection of literary works / is subclass of series of creative works / is instance of literary form / is subclass of literary work / is subclass of publication / is subclass of serial
2. The Veteran (wd:Q8774146, matched via The Veteran (short story collection)), also known as The Veteran (short story collection): 2001 short story collection by Frederick Forsyth / is instance of literary work
3. The Boat (wd:Q10438638, matched via The Boat (short story collection)), also known as The Boat (short story collection): short story collection by Nam Le / is instance of literary work / short story by Nam Le / short story by Nam Le
4. The Stray Dog (short story collection) (wd:Q21076280): Short story collection by Sadegh Hedayat / is instance of literary work
5. I Love Short Story Collections (wd:Q128562695): is instance of scholarly article / is instance of academic article / scholarly article
6. flash fiction (wd:Q5457615, matched via short short story), also known as fast fiction, microfiction, nanofiction, short short story, sudden fiction: style of fictional literature or fiction of extreme brevity / is subclass of fiction literature / is instance of literary genre / is instance of literary form / is subclass of short prose / is subclass of xiaoshuo
7. People, Places and Things (wd:Q2069580, matched via People, Places and Things (short story collection)), also known as People, Places and Things (short story collection): Unpublished short story collection of Stephen King / is instance of literary work / is instance of written work
8. None So Blind: A Short Story Collection (wd:Q54839291): is instance of literary work / book by Joe Haldeman
9. short story (wd:Q49084), also known as tale: brief work of literature, usually written in narrative prose / is subclass of work of fiction / is instance of literary form / is subclass of narration / is subclass of Prose / is subclass of prose
10. literary character (wd:Q3658341, matched via short story character), also known as book character, character in a book, character in a novel, character in a short story, character in literature, etc.: fictional character appearing in written works / fictional character appearing in written works / is instance of type of fictional character / is subclass of character

[Assistant] I'll check whether short story collection (wd:Q1279564) is a subclass of book (wd:Q571). If it is, then filtering by subclass-of book will include short story collections.

[Assistant]
I'll search for entities corresponding to "book", "novel", "short story collection", "written work", and "literary work" to get their Q-IDs so I can filter instance-of against them. I already have book (Q571), novel (Q8261), and short story collection (Q1279564). I'll search for "written work" and "literary work".

Question: written work

Top 10 entity alternatives:
1. written work (wd:Q47461344), also known as creative written work, written delivery: any work expressed in writing, such as inscriptions, manuscripts, documents or maps / any work expressed in writing, such as inscriptions, manuscripts, documents or maps / is subclass of intellectual work / is instance of collective noun / is instance of Collective noun
2. lost literary work (wd:Q1585442, matched via lost written work), also known as lost book, lost document, lost printed books, lost written work: literary work produced some time in the past of which no surviving copies are known to exist / is instance of type of literary work / is subclass of lost creative work / is subclass of literary work / is subclass of occurrence / is instance of property / is instance of Property / is subclass of event
3. written or drawn work (wd:Q25839930), also known as book, work: what is produced by a worker and may be edited and printed to give paper books / is subclass of printed matter / is subclass of creative work / is subclass of written work
4. book series (wd:Q277759, matched via series of written works), also known as series of books, series of texts, series of written works: sequence of books having certain characteristics in common that are formally identified together as a group / is subclass of series of creative works / is subclass of group of manifestations / is subclass of written work / is subclass of book set / is subclass of serial
5. works written by this person (wd:Q111590755, matched via work written by this person), also known as work written by this person: is instance of Wikidata metaclass / is subclass of creative work / is instance of metaclass / is subclass of work / Wikidata metaclass
6. film (wd:Q11424, matched via cinematic work), also known as cinema, cinematic work, films, flick, motion picture, etc.: sequence of images that give the impression of movement, stored on film stock / sequence of images that give the impression of movement, stored on film stock / sequence of images that give the impression of movement / sequence of images that give the impression of movement / is subclass of audiovisual work / is subclass of visual artwork / is subclass of moving image
7. comics (wd:Q1004, matched via comic work), also known as comic work, ninth art, sequential art: creative work in which images and text convey information such as narratives / is subclass of illustrated work / is instance of literary genre / is subclass of visual artwork / is subclass of sequential art / is instance of literary form / is subclass of literary work / is instance of type of arts / is subclass of narrative
8. work (wd:Q268378), also known as labor, labour, work (human activity): particular form of activity, sold by many people to sustain themselves / activities performed as a means of support / is instance of sociological concept / is subclass of economic activity / is instance of economic concept
9. work (wd:Q42213), also known as mechanical work, physical work: energy transferred to an object via the application of force on it through a displacement / energy transferred to an object via the application of force on it through a displacement / is subclass of Physical quantity / is subclass of physical quantity / is subclass of energy transfer / is subclass of Energy / is subclass of energy
10. letter (wd:Q133492, matched via written correspondence), also known as ✉, epistle, mail, message, note, etc.: is subclass of personal testimonial / written message from one to another / is instance of literary genre / is instance of literary form / is subclass of written work / is subclass of mail item / is subclass of document

[Assistant]
I'll also search for "literary work".

Question: literary work

Top 10 entity alternatives:
1. literary work (wd:Q7725634), also known as literary text, work in literature: creative work by a writer created with aesthetic, academic or recreative purposes / written work read for enjoyment or edification / is subclass of creative work / is subclass of type of work / is subclass of written work
2. DARK HORSE by Michèle Betty (wd:Q125465635, matched via Literary work), also known as Literary work: is instance of literary work / Book by Michèle Betty
3. literary work (wd:Q114797888): legal concept defining a type of copyrightable work / is subclass of valid subject matter for copyright / is instance of legal concept / is subclass of literary work / is instance of condition
4. Dura-Europos archival photograph of front of P. CtYBR inv. DP 111 (wd:Q119126425, matched via Literary work), also known as Literary work: archival photograph of front of p. ctybr inv. dp 111 from dura-europos / is instance of archival resource / is instance of photograph
5. Dura-Europos archival photograph of back of P. CtYBR inv. DP 111 (wd:Q119126424, matched via Literary work), also known as Literary work: archival photograph of back of p. ctybr inv. dp 111 from dura-europos / is instance of archival resource / is instance of photograph
6. Dura-Europos archival photograph of front of P. CtYBR inv. DP 44 (wd:Q119126533, matched via Literary work), also known as Literary work: archival photograph of front of p. ctybr inv. dp 44 from dura-europos / is instance of archival resource / is instance of photograph
7. Dura-Europos archival photograph of back of P. CtYBR inv. DP 44 (wd:Q119126531, matched via Literary work), also known as Literary work: archival photograph of back of p. ctybr inv. dp 44 from dura-europos / is instance of archival resource / is instance of photograph
8. Dura-Europos archival photograph of front of P. CtYBR inv. DP 87 (wd:Q119126454, matched via Literary work), also known as Literary work: archival photograph of front of p. ctybr inv. dp 87 from dura-europos / is instance of archival resource / is instance of photograph
9. Dura-Europos archival photograph of back of P. CtYBR inv. DP 87 (wd:Q119126451, matched via Literary work), also known as Literary work: archival photograph of back of p. ctybr inv. dp 87 from dura-europos / is instance of archival resource / is instance of photograph
10. Dura-Europos archival photograph of front of P. CtYBR inv. DP 89 (wd:Q119126448, matched via Literary work), also known as Literary work: archival photograph of front of p. ctybr inv. dp 89 from dura-europos / is instance of archival resource / is instance of photograph

[Assistant]
I'll run a SPARQL query that finds items with P50 = Arthur Conan Doyle (wd:Q35610) and filters those items to likely "books" by checking instance-of against several literature/work classes (book, novel, short story collection, literary work, written work) or by presence of publication metadata such as ISBN, publication date or publisher. The query will return the work QIDs and English labels, their instance-of type and publication date/ISBN when available. Now I'll execute that query.

SELECT DISTINCT ?work ?workLabel ?type ?typeLabel ?pubdate ?isbn WHERE {
  VALUES ?author { wd:Q35610 }
  ?work wdt:P50 ?author .
  OPTIONAL { ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel)="en") }
  OPTIONAL { ?work wdt:P31 ?type . ?type rdfs:label ?typeLabel . FILTER(LANG(?typeLabel)="en") }
  OPTIONAL { ?work wdt:P577 ?pubdate . }
  OPTIONAL { ?work wdt:P212 ?isbn . }
  FILTER( (bound(?type) && ?type IN (wd:Q571, wd:Q8261, wd:Q1279564, wd:Q7725634, wd:Q47461344)) || bound(?isbn) || bound(?pubdate) || EXISTS { ?work wdt:P123 ?publisher } )
}
ORDER BY ?workLabel

[Assistant]
I'll refine the query to:
- exclude items that are translations/editions (instance of Q3331189),
- require an English label (so we return readable titles),
- keep the earlier filters to capture books (instance-of common literary types OR have ISBN/publication/publisher).

I'll run the refined query now.

SELECT DISTINCT ?work ?workLabel ?type ?typeLabel ?pubdate ?isbn WHERE {
  VALUES ?author { wd:Q35610 }
  ?work wdt:P50 ?author .
  OPTIONAL { ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel)="en") }
  OPTIONAL { ?work wdt:P31 ?type . ?type rdfs:label ?typeLabel . FILTER(LANG(?typeLabel)="en") }
  OPTIONAL { ?work wdt:P577 ?pubdate . }
  OPTIONAL { ?work wdt:P212 ?isbn . }
  FILTER( ( (bound(?type) && ?type IN (wd:Q571, wd:Q8261, wd:Q1279564, wd:Q7725634, wd:Q47461344)) || bound(?isbn) || bound(?pubdate) || EXISTS { ?work wdt:P123 ?publisher } )
    && NOT EXISTS { ?work wdt:P31/wdt:P279* wd:Q3331189 }
    && bound(?workLabel)
  )
}
ORDER BY ?workLabel

[Assistant]
I'll narrow the results to items whose instance-of (P31) is one of:
- book (wd:Q571)
- novel (wd:Q8261)
- short story collection (wd:Q1279564)

This should return the principal books (novels and collections) by Arthur Conan Doyle and exclude individual short stories, quotations, translations and editions. I'll run that query now.

SELECT DISTINCT ?work ?workLabel ?type ?typeLabel ?pubdate ?isbn WHERE {
  VALUES ?author { wd:Q35610 }
  ?work wdt:P50 ?author .
  ?work wdt:P31 ?type .
  FILTER(?type IN (wd:Q571, wd:Q8261, wd:Q1279564))
  OPTIONAL { ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel)="en") }
  OPTIONAL { ?type rdfs:label ?typeLabel . FILTER(LANG(?typeLabel)="en") }
  OPTIONAL { ?work wdt:P577 ?pubdate . }
  OPTIONAL { ?work wdt:P212 ?isbn . }
  FILTER(NOT EXISTS { ?work wdt:P31/wdt:P279* wd:Q3331189 })
  FILTER(bound(?workLabel))
}
ORDER BY ?workLabel

[Assistant]
I'll expand the allowed instance-of types to include literary work and written work, but require that items which are only marked as "literary work" or "written work" also have publication metadata (ISBN, publication date, or publisher). This should capture actual books while excluding single short stories or quotations. Running the query now.

SELECT DISTINCT ?work ?workLabel ?type ?typeLabel ?pubdate ?isbn WHERE {
  VALUES ?author { wd:Q35610 }
  ?work wdt:P50 ?author .
  ?work wdt:P31 ?type .
  FILTER(?type IN (wd:Q571, wd:Q8261, wd:Q1279564, wd:Q7725634, wd:Q47461344))
  OPTIONAL { ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel)="en") }
  OPTIONAL { ?type rdfs:label ?typeLabel . FILTER(LANG(?typeLabel)="en") }
  OPTIONAL { ?work wdt:P577 ?pubdate . }
  OPTIONAL { ?work wdt:P212 ?isbn . }
  FILTER( ( ?type IN (wd:Q571, wd:Q8261, wd:Q1279564) || bound(?isbn) || bound(?pubdate) || EXISTS { ?work wdt:P123 ?publisher } )
    && NOT EXISTS { ?work wdt:P31/wdt:P279* wd:Q3331189 }
    && bound(?workLabel)
  )
}
ORDER BY ?workLabel

Got 145 rows and 6 columns, showing the first 5 and last 5 rows below:
| work                                                 | workLabel                                      | type                        | typeLabel               | pubdate                             | isbn |
| ---------------------------------------------------- | ---------------------------------------------- | --------------------------- | ----------------------- | ----------------------------------- | ---- |
| A Case of Identity (wd:Q1151528)                     | A Case of Identity (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1891-09-01T00:00:00Z (xsd:dateTime) |      |
| A Duet with an Occational Chorus (wd:Q124080746)     | A Duet with an Occational Chorus (lang:en)     | literary work (wd:Q7725634) | literary work (lang:en) | 1899-01-01T00:00:00Z (xsd:dateTime) |      |
| A Medical Document (wd:Q61958955)                    | A Medical Document (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1919-01-01T00:00:00Z (xsd:dateTime) |      |
| An Actor's Duel and The Winning Shot (wd:Q124081490) | An Actor's Duel and The Winning Shot (lang:en) | literary work (wd:Q7725634) | literary work (lang:en) | 1894-01-01T00:00:00Z (xsd:dateTime) |      |
| An Exciting Christmas Eve (wd:Q52780178)             | An Exciting Christmas Eve (lang:en)            | literary work (wd:Q7725634) | literary work (lang:en) | 1883-12-01T00:00:00Z (xsd:dateTime) |      |
| ...                                                  | ...                                            | ...                         | ...                     | ...                                 | ...  |
| The White Company (wd:Q2297190)                      | The White Company (lang:en)                    | written work (wd:Q47461344) | written work (lang:en)  | 1891-01-01T00:00:00Z (xsd:dateTime) |      |
| Through the Magic Door (wd:Q121817887)               | Through the Magic Door (lang:en)               | literary work (wd:Q7725634) | literary work (lang:en) | 1907-01-01T00:00:00Z (xsd:dateTime) |      |
| Uncle Bernac (wd:Q48748249)                          | Uncle Bernac (lang:en)                         | literary work (wd:Q7725634) | literary work (lang:en) | 1897-01-01T00:00:00Z (xsd:dateTime) |      |
| When the World Screamed (wd:Q2563966)                | When the World Screamed (lang:en)              | literary work (wd:Q7725634) | literary work (lang:en) | 1928-01-01T00:00:00Z (xsd:dateTime) |      |
| Your Share of Fear (wd:Q17630018)                    | Your Share of Fear (lang:en)                   | literary work (wd:Q7725634) | literary work (lang:en) | 1987-01-01T00:00:00Z (xsd:dateTime) |      |

[Assistant]
To give a concise set of his principal books, I'll check Arthur Conan Doyle's "notable work" (P800) statements on his Wikidata item — these usually list the most significant books associated with an author. I'll run a query to retrieve wd:Q35610 wdt:P800.

SELECT ?work ?workLabel WHERE { wd:Q35610 wdt:P800 ?work . OPTIONAL { ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel) = "en") } } ORDER BY ?workLabel

Got 2 rows and 2 columns:
| work                                   | workLabel                          |
| -------------------------------------- | ---------------------------------- |
| canon of Sherlock Holmes (wd:Q2316684) | canon of Sherlock Holmes (lang:en) |
| The Lost World (wd:Q785255)            | The Lost World (lang:en)           |

[Assistant]
I'll verify presence of several well-known Arthur Conan Doyle books by label (so I can list reliable examples). I'll look for these English titles and confirm they have P50 = Arthur Conan Doyle: "A Study in Scarlet", "The Sign of the Four", "The Hound of the Baskervilles", "The Valley of Fear", "The Lost World", "The White Company". Running that check now.

SELECT ?work ?workLabel WHERE {
  VALUES ?title { "A Study in Scarlet"@en "The Sign of the Four"@en "The Hound of the Baskervilles"@en "The Valley of Fear"@en "The Lost World"@en "The White Company"@en }
  ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel) = "en" && ?workLabel IN (?title))
  ?work wdt:P50 wd:Q35610 .
} ORDER BY ?workLabel

Got 7 rows and 2 columns:
| work                                          | workLabel                               |
| --------------------------------------------- | --------------------------------------- |
| A Study in Scarlet (wd:Q223131)               | A Study in Scarlet (lang:en)            |
| The Hound of the Baskervilles (wd:Q120490748) | The Hound of the Baskervilles (lang:en) |
| The Hound of the Baskervilles (wd:Q45192)     | The Hound of the Baskervilles (lang:en) |
| The Lost World (wd:Q785255)                   | The Lost World (lang:en)                |
| The Sign of the Four (wd:Q78629473)           | The Sign of the Four (lang:en)          |
| The Valley of Fear (wd:Q863438)               | The Valley of Fear (lang:en)            |
| The White Company (wd:Q2297190)               | The White Company (lang:en)             |

[Assistant]
answer

SELECT DISTINCT ?work ?workLabel ?type ?typeLabel ?pubdate ?isbn WHERE {
  VALUES ?author { wd:Q35610 }
  ?work wdt:P50 ?author .
  ?work wdt:P31 ?type .
  FILTER(?type IN (wd:Q571, wd:Q8261, wd:Q1279564, wd:Q7725634, wd:Q47461344))
  OPTIONAL { ?work rdfs:label ?workLabel . FILTER(LANG(?workLabel)="en") }
  OPTIONAL { ?type rdfs:label ?typeLabel . FILTER(LANG(?typeLabel)="en") }
  OPTIONAL { ?work wdt:P577 ?pubdate . }
  OPTIONAL { ?work wdt:P212 ?isbn . }
  FILTER( ( ?type IN (wd:Q571, wd:Q8261, wd:Q1279564) || bound(?isbn) || bound(?pubdate) || EXISTS { ?work wdt:P123 ?publisher } )
    && NOT EXISTS { ?work wdt:P31/wdt:P279* wd:Q3331189 }
    && bound(?workLabel)
  )
}
ORDER BY ?workLabel

Answer:
I ran a Wikidata query that returns items with P50 = Arthur Conan Doyle (wd:Q35610) and filters for items that are likely books (instance-of common book/novel/collection types, or have publication metadata), while excluding translations/editions. The query returned 145 works matching those criteria.

Examples of books by Arthur Conan Doyle found in the results (with their Wikidata Q-IDs):
- A Study in Scarlet (wd:Q223131)
- The Sign of the Four (wd:Q78629473)
- The Hound of the Baskervilles (wd:Q45192)  [there is also another item wd:Q120490748]
- The Valley of Fear (wd:Q863438)
- The Lost World (wd:Q785255)
- The White Company (wd:Q2297190)

If you want the full list (all 145 items), I can return the complete result set (labels and QIDs), or export it as CSV/JSON. You can also further narrow the query (e.g., only novels, only works with ISBNs, or only Sherlock Holmes books).