Talk:Q637866

From Wikidata
Jump to navigation Jump to search

Autodescription — book review (Q637866)

description: form of literary criticism in which a book is analyzed based on content, style, and merit
Useful links:
Classification of the class book review (Q637866)  View with Reasonator View with SQID
For help about classification, see Wikidata:Classification.
Parent classes (classes of items which contain this one item)
Subclasses (classes which contain special kinds of items of this class)
book review⟩ on wikidata tree visualisation (external tool)(depth=1)
Generic queries for classes
See also


Maintenance queries

[edit]

count number of book reviews

[edit]
SELECT (COUNT(*) as ?ct)  WHERE { ?item wdt:P136 wd:Q637866 ; wdt:P31 wd:Q13442814 }
Try it!
SELECT (COUNT(*) as ?ct)  WHERE { ?item wdt:P136 wd:Q637866 }
Try it!

find more book reviews

[edit]
SELECT DISTINCT ?item ?itemLabel ?title ("P??" as ?pr) ("Q637866" as ?value)
{
  hint:Query hint:optimizer "None".
  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch "\"book review\" haswbstatement:P31=Q13442814 -haswbstatement:P921=Q33057 -haswbstatement:P921=Q637866 -haswbstatement:P136=Q637866  -haswbstatement:P31=Q637866  -haswbstatement:P6977".
    ?title wikibase:apiOutput mwapi:title.
  }
  BIND(IRI(CONCAT(STR(wd:), ?title)) AS ?item)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
}
Try it!

One may want to differentiate:

find more book reviews (cont)

[edit]
SELECT DISTINCT ?item ?itemLabel ?title ("P??" as ?pr) ("Q637866" as ?value)
{
  hint:Query hint:optimizer "None".
  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch "ISBN haswbstatement:P31=Q13442814 -haswbstatement:P921=Q33057 -haswbstatement:P921=Q637866 -haswbstatement:P136=Q637866  -haswbstatement:P31=Q637866  -haswbstatement:P6977".
    ?title wikibase:apiOutput mwapi:title.
  }
  BIND(IRI(CONCAT(STR(wd:), ?title)) AS ?item)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
}
Try it!

One may want to differentiate:

Reference queries

[edit]

articles about book reviews

[edit]
SELECT
  ?item ?itemLabel ?itemDescription 
  (SAMPLE(?d) as ?d) (SAMPLE(?tp) as ?tp) 
  (GROUP_CONCAT(DISTINCT ?an; separator=", ") as ?ann) (GROUP_CONCAT(DISTINCT ?al; separator=", ") as ?all) 
WHERE
{
	?item wdt:P921 wd:Q637866 ; wdt:P31 wd:Q13442814 
    OPTIONAL { ?item p:P577 / psv:P577 [ wikibase:timeValue ?d ; wikibase:timePrecision ?tp ] }
	OPTIONAL { ?item wdt:P2093 ?an } 
    OPTIONAL { ?item wdt:P50 / rdfs:label ?al . FILTER( lang(?al)="en" ) }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
GROUP BY ?item ?itemLabel ?itemDescription
ORDER BY DESC(?d)

Try it!

articles about ISBN

[edit]
SELECT
  ?item ?itemLabel ?itemDescription 
  (SAMPLE(?d) as ?d) (SAMPLE(?tp) as ?tp) 
  (GROUP_CONCAT(DISTINCT ?an; separator=", ") as ?ann) (GROUP_CONCAT(DISTINCT ?al; separator=", ") as ?all) 
WHERE
{
	?item wdt:P921 wd:Q33057 ; wdt:P31 wd:Q13442814 
    OPTIONAL { ?item p:P577 / psv:P577 [ wikibase:timeValue ?d ; wikibase:timePrecision ?tp ] }
	OPTIONAL { ?item wdt:P2093 ?an } 
    OPTIONAL { ?item wdt:P50 / rdfs:label ?al . FILTER( lang(?al)="en" ) }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
GROUP BY ?item ?itemLabel ?itemDescription
ORDER BY DESC(?d)

Try it!

Discussion

[edit]