query-77fb03a178cafcb9b5c5120843d5e6b7

rq turtle/ttl

List of defined daily dosages, the unit and route of administration SELECT ?item ?itemLabel ?ddd ?dddUnitLabel ?routeLabel WHERE { ?item wdt:P4250 ?ddd . ?item p:P4250/psv:P4250 ?value_statement . ?value_statement wikibase:quantityUnit ?dddUnitLabel . ?item p:P4250 ?statement . OPTIONAL { ?statement pq:P636 ?route } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# List of defined daily dosages, the unit and route of administration
SELECT ?item ?itemLabel ?ddd ?dddUnitLabel ?routeLabel
WHERE
{
    ?item wdt:P4250 ?ddd .
    ?item p:P4250/psv:P4250 ?value_statement .
    ?value_statement wikibase:quantityUnit ?dddUnitLabel .
    ?item p:P4250 ?statement .
    OPTIONAL { ?statement pq:P636 ?route }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en"  }    
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?ddd"):::projected v4("?dddUnitLabel"):::projected v1("?item"):::projected v6("?route") v5("?statement") v3("?value_statement") a1((" ")) c7(["bd:serviceParam"]):::iri c9(["en"]):::literal v1 --"p:direct/P4250"--> v2 v1 --"p:P4250"--> a1 a1 --"p:statement/value/P4250"--> v3 v3 --"wikibase:quantityUnit"--> v4 v1 --"p:P4250"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:qualifier/P636".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end