Reputation:
Lets assume I have a list of items and one item is depend on one category and other item depend on that same category.
In summary i1 depends on c1, i2 depends on c1.
I want to see all the i1, i2 and c1 rows, this statement:
PREFIX shop: <someurl>
SELECT ?i1_name ?i2_name ?c_name
{
?i1 shop:depends ?c.
?i2 shop:depends ?c.
?i1 shop:name ?i1_name.
?i2 shop:name ?i2_name.
?c shop:cat_name ?c_name
FILTER(?i1 != ?i2)
}
Returns
i1_name, i2_name, c_name
i2_name, i1_name, c_name
What I want to see is just one line. How can I achive this?
Thanks. Kind Regards
Upvotes: 0
Views: 141
Reputation: 4042
Not sure, but maybe you should replace
FILTER(?i1 != ?i2)
by
FILTER(?i1 < ?i2)
See what happens.
Upvotes: 2