Good morning from Stuttgart,

I went further and think, I got some of the principles of querying.

Let's extend the graph:

Openinterest : Date, Contracts->SubCategory

Industry->Category->SubCategory->Contract

Then

select name, categories.name, categories.subcategories.contracts.symbol 
           from Industries 
                   where categories in( 
                              select from Categories where subcategories IN 
(
                                         select  from Subcategories where 
contracts IN( 
                                                    select 
expand(contracts) 
                                                              from 
Openinterest 
                                                                      
 where fetch_date = '2015-06-02' )
                                                                            
                                 ) 
                                                   )

uses the contracts in Openinterest to build the following table:

name                      categories                                       
                categories2

Technology           ["Software","Semiconductors","Computers"]   
[["MSFT"],["MU","QCOM","AMAT","INTC"],["BBRY","AAPL"]]
Basic Materials      ["Mining","Iron/Steel","Chemicals"]                 
[["AA","ABX","FCX"],["VALE","CLF"],["BAS","DOW"]]
(...)

Problem is: The Contracts displayed are all Contracts present in the Link 
Subcategory.contracts.
I am not even shure, if the Categories match the selection of OpenInterest 
of if all present Categories are queried.
But I want the Contracts from OpenInterest.

I know – I am still comparing to traditional databases. Orientdb claims to 
be as powerful als RDMS, therefor  my stupid mind has to adapt...

-- 

--- 
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