Hi,

two small questions from an OrientDB beginner... 

I have a graph with one type of Vertices - "Person" - and one type of Edges 
- "Called".
The graph describes phone conversations between people, with each edge 
having a "start_time" and "end_time" properties which describe the call's 
start and end times.

For example, to get all the ongoing conversations in a specific time, I can 
do SELECT FROM Called WHERE start_time>X AND end_time<Y.

1. 
I am looking for a query which will return *all people that were having a 
conversation in a specific hour*.
When I want to get the people themselves, I'm using SELECT bothV() FROM 
Called WHERE start_time>X AND end_time<Y.
The problem with this query is that I get duplicate results - if a person 
had multiple calls, I'll get his record multiple times. I don't want to 
remove duplicates in the application itself.

I've tried several strategies to solve this, including dividing it to 
multiple queries with LET... but it seems too complicated for a rather 
simple query.
Any ideas?

2. Continuing that question - is there a single query which will return all 
filtered Edges *and* their attached Vertices? In order to optimize the edge 
filtering query and do it only once?

Thanks so much for the help.
This seems like an active group - hope I'll be able to contribute to it in 
the future :)

Lior

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to