query-f6abb72cc28b5746524f287d76982dd3
Query with sample
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?url ?family (SAMPLE(?article) as ?article) (SAMPLE(?item) as ?item)
WHERE
{
{
SELECT DISTINCT ?url ?family
{ ?url wikibase:wikiGroup ?family
FILTER NOT EXISTS { [] wdt:P856 ?url ; wdt:P1800 [] }
}
} OPTIONAL { ?article schema:about ?item ; schema:isPartOf ?url }
}
GROUP BY ?url ?family
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?article"):::projected
v2("?family"):::projected
v5("?item"):::projected
v1("?url"):::projected
a1((" "))
a2((" "))
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0a1 --"wdt:P856"--> e0v1
e0a1 --"wdt:P1800"--> e0a2
e0v1("?url"):::projected
e0a1((" ")):::projected
e0a2((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> a1
f0 --> c1
f0 --> v1
f0 --> c2
f0 --> a2
a1 --"wdt:P856"--> v1
a1 --"wdt:P1800"--> a2
v1 --"wikibase:wikiGroup"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v5
v5 --"schema:isPartOf"--> v1
end
bind3[/"sample(?article)"/]
v5 --o bind3
bind3 --as--o v5
bind4[/"sample(?item)"/]
v5 --o bind4
bind4 --as--o v5