Grrrrrr Google logged me out after typing a very detailed reply to your response.
In short your query seems to be what I need, I can easily write something to generate the code so the number of steps doesn't matter. GA has a similar concept here is a screenshot of what it looks like. <https://lh4.googleusercontent.com/-nUpgymxd3hk/UtA-o42IU0I/AAAAAAAAACw/6nRFYwXcbbo/s1600/Untitled.png> so if we change the example and use visitors and pages viewed on a website. Visitor1 - viewed (Page1.html,Page2.html,Page3.html,Page4.html,Page5.html) Visitor2 - viewed (Page15.html,Page12.html,Page1.html,Page4.html,Page15.html) Visitor3 - viewed (Page9.html,Page2.html,Page3.html,Page6.html,Page4.html) if I run a query say give me all visitors who viewed the following (Page2.html,Page3.html,Page4.htmll) the results will be *Visitor1 *and *Visitor2.* Thanks for all your help so far. Andr'e On Friday, January 10, 2014 11:55:07 AM UTC-5, Lvc@ wrote: > > Hi, > so do all X, Y and Z must be executed in the timeframe? How many X, Y and > Z can you have? Only one? > > select from employee > let $x = first( out('X').date ), $y = fist( out('Y').date ), $z = first( > out('Z').date ) > where $z > $y and $y > $x > and $x >= "2012-01-01" and $z <= "2012-01-02" > > Lvc@ > > > On 10 January 2014 15:42, Andr'e <[email protected] <javascript:>>wrote: > >> Hi Lvc@, >> >> Thanks for replying, I'm not sure your solution gives me what I need but >> correct me if I'm wrong but I need a sequence of events not a single event. >> >> it needs to be something in the nature of >> >> select from employee where out('Y').then.out('Z') date between....Z must >> have occurred after Y in order. >> >> it should be in sequence, the query should contain multiple edges, a >> single edge seems pretty straight forward but I need it in multiple edges. >> All the employees that did X and THEN did Y and THEN did Z between >> 2012-01-01 and 2012-01-02. >> >> hope my explanation is clear. >> >> Andr'e >> >> >> On Friday, January 10, 2014 3:57:37 AM UTC-5, Lvc@ wrote: >> >>> Hi Andr'e, >>> if you model edge type as X, Y and Z you should create separate Edge >>> classes those extend "E". Then you could do something like: >>> >>> select from Employee where outE('y').date between 2014-01-01 and >>> 2012-01-02 >>> >>> Lvc@ >>> >>> >>> >>> On 10 January 2014 07:50, Andr'e <[email protected]> wrote: >>> >>>> I need help as I'm new to graph databases and I'm loving OrientDB, >>>> however, I'm a long time user of MongoDB in large scale so i'm not new to >>>> document/nosql databases. We currently have millions of records in MongoDB >>>> and it works perfectly and we've been thinking about building a graph db >>>> cluster which led me to OrientDB - mainly for things like recommendations >>>> and other algorithms that we would like to process. We've evaluated for a >>>> while and OrientDB is able to do all of our requirements except one, which >>>> is the ability to query a set of actions in sequence that match a specific >>>> pattern, I can't figure it out to save my life in an efficient manner that >>>> is without doing multiple queries. >>>> >>>> So here is the scenario, I have a database of employee actions each >>>> tied back to a employee by id. Now I want to create a graph that will >>>> represent all employees and what they did, employee 1 did (x on 1/1/2014), >>>> did (y on 1/2/2014) and so on and so forth. Each action can have 1...N >>>> number of property and each employee an have 1..N number of actions. So >>>> (correct me if I'm wrong here) we will create a vertex called "Employee" >>>> and another called "Action" and then an edge called "did", so we will >>>> store >>>> directed entries of "employee 1 did x" and "employee 1 did y"... >>>> >>>> The heart breaking side of this story is how do I query all those >>>> entries that will return employees that did certain actions in sequence. >>>> Say, give me all employees that did "x" and then "y" and then "z" between >>>> 1/1/2014 and 2/1/2014? It could also be give me all employees that did "x >>>> & >>>> y.name=true" and then "y" and then "y" between 1/1/2014 and 2/1/2014, >>>> adding properties. >>>> >>>> Any help will be greatly appreciated, I'm open to any ideas, >>>> suggestions or comments. >>>> >>>> -- >>>> >>>> --- >>>> 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/groups/opt_out. >>>> >>> >>> -- >> >> --- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- --- 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/groups/opt_out.
