Re: [Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Alexander Sidorov
Sorry Sebastian. I was wrong about scopes. Generally looks like a bug. 2010/3/23 Sebastian Hellmann > Hi Alex, > > Am 23.03.2010 12:25, schrieb Alexander Sidorov: > > Hi Sebastian, > > > I think the first query doesn't work because you are trying to filter first > subquery variable in the scope

Re: [Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Sebastian Hellmann
Hi Alex, Am 23.03.2010 12:25, schrieb Alexander Sidorov: Hi Sebastian, I think the first query doesn't work because you are trying to filter first subquery variable in the scope of second subquery. Could you please you elaborate this? Is there an implicit scope not defined by brackets? I w

Re: [Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Alexander Sidorov
I have looked through plenty of Virtuoso documentation articles and blogposts and haven't found any IN usage with subqueries. Is it possible? 2010/3/23 Ivan Mikhailov > Hello Alexander, > > > Let's imagine we have a list of entities uris' as input and we need to > retrieve all triples for each e

Re: [Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Alexander Sidorov
Hi Sebastian, I think the first query doesn't work because you are trying to filter first subquery variable in the scope of second subquery. Regards, Alexander 2010/3/23 Sebastian Hellmann > Hello, > the IN is very fast and I would recommend to anyone using it. > btw. will IN be a part of the

Re: [Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Sebastian Hellmann
Hello, the IN is very fast and I would recommend to anyone using it. btw. will IN be a part of the next SPARQL recommendation? I have just a short question (tested on dbpedia): SELECT DISTINCT ?subject { { ?subject a ?expanded0 } UNION { ?subject a ?expanded1 } FILTER ( ?expanded0 IN (

Re: [Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Alexander Sidorov
Hi Ivan, Thank you! I should guess by analogy with SQL... Does IN operator work with subqueries? I have the following query: SELECT DISTINCT ?s ?p ?o FROM WHERE { ?s ?p ?o FILTER ( ?s in ( ( SELECT DIST

Re: [Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Ivan Mikhailov
Hello Alexander, > Let's imagine we have a list of entities uris' as input and we need to retrieve all triples for each entity. > Is there any way to execute it using one query? We have an IN operator extension: select ?p ?o where { ?s ?p ?o . filter (?s in (, , ... ) ) } Best Regards,

[Virtuoso-users] Retrieve triples for list of entities

2010-03-23 Thread Alexander Sidorov
Hello! Let's imagine we have a list of entities uris' as input and we need to retrieve all triples for each entity. The brute force solution is to process entities one by one executing the following query n times: select ?p ?o where { ?p ?o } N = 0..n But it looks very inefficient. Is there