kailashthakuri
kailashthakuri

Reputation: 89

Retrieve the subjects that have at most two properties

I wanted to retrive subjects which have less than three properties. I tried with following query.

SELECT ?s
WHERE {
 ?s ?p ?o .
}
group by ?s
having (count(?p) < 3)
limit 10

But it's taking quite long time. Do we have any other optimized way to do same thing.

Upvotes: 1

Views: 40

Answers (0)

Related Questions