query-7537425851ec248491d8403b0e673f0c
Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are יש להריץ את השאילתה הזאת. בזמן תרגום המסמך הזה, מוחזרות רק 21 תוצאות - ממש טיפה בים! למה זה ככה? לפני כן מצאנו למעלה ממאה ספרים! הסיבה לכך היא שכדי לענות על השאילתה הזאת, על תוצאה אפשרית (ספר) לענות על כל השלישיות שהצבנו: זאת חייבת להיות כותרת, ומאייר, והוצאה לאור ותאריך פרסום. אם לספר יש כמה מהמאפיינים האלה אך לא את כולם הוא לא יענה לחיפוש. וזה לא מה שאנחנו רוצים במקרה הזה: אנחנו בעיקר רוצים רשימה של כל הספרים - אם יש מידע נוסף, נרצה לכלול אותו, אך לא נרצה שהוא יגביל את רשימת התוצאות שלנו. (optional): רשותהפתרון הוא לומר ל־WDQS שהשלישיות האלה הן בגדר Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT <span lang="en" dir="ltr" class="mw-content-ltr">?book ?title ?illustratorLabel ?publisherLabel ?published</span>
WHERE
{
?book wdt:P50 wd:Q35610.
OPTIONAL { ?book wdt:P1476 ?title. }
OPTIONAL { ?book wdt:P110 ?illustrator. }
OPTIONAL { ?book wdt:P123 ?publisher. }
OPTIONAL { ?book wdt:P577 ?published. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/da
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/he
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/hy
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/lb
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/ru
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/szl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/tr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/uk
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/zh