I am using the below query to return the details of Google.
SELECT
?property
?propertyLabel
?qval
(GROUP_CONCAT(DISTINCT ?val_Label; separator="; ") AS ?val_Label) WHERE {
?property a wikibase:Property; wikibase:claim ?p; wikibase:statementProperty ?ps; wikibase:qualifier ?pq.
?property rdfs:label ?propertyLabel . FILTER (LANG(?propertyLabel) = 'en' )
?company ?p ?statement . ?statement wikibase:rank ?rank .
FILTER (?rank IN (wikibase:NormalRank, wikibase:PreferredRank))
?statement ?ps ?value . # URI, literal or blank node
OPTIONAL {?value rdfs:label ?valueLabel . FILTER (LANG(?valueLabel) = 'en')}
BIND (COALESCE(?valueLabel, ?value) AS ?val_Label)
OPTIONAL { ?statement ?pq ?qval }
} GROUP BY ?property ?propertyLabel ?qval
VALUES (?company) {(wd:Q95)}
I expect that the qualifiers to be returned if there is any associated with the statements but it doesn't return. I am not sure where it fails.