Hello, 

I have this query: 

SELECT in.@rid as id, in.inE("shared").size() as shares, in.issue as issue, 
date FROM (select expand(inE('published')) from publications )  ORDER BY 
date DESC, shares DESC, starred DESC LIMIT 3

Which give me this result:

          {
            "@type": "d",
            "@rid": "#-2:4",
            "@version": 0,
            "id": "#16:17",
            "shares": 0,
            "issue": "October",
            "date": "2014-11-19T23:00:00.000",
            "@fieldTypes": "date=t"
        },
        {
            "@type": "d",
            "@rid": "#-2:1",
            "@version": 0,
            "id": "#16:14",
            "shares": 0,
            "issue": "November Issue",
            "date": "2014-11-16T23:00:00.000",
            "@fieldTypes": "date=t"
        },
        {
            "@type": "d",
            "@rid": "#-2:10",
            "@version": 0,
            "id": "#16:23",
            "shares": 0,
            "issue": "2014-11-17",
            "date": "2014-11-16T23:00:00.000",
            "@fieldTypes": "date=t"
}

I can even filter my result using the date, like this:

SELECT in.@rid as id, in.inE("shared").size() as shares, in.issue as issue, 
date FROM (select expand(inE('published')) from publications ) WHERE  date < 
date('10-12-2014', 'dd-MM-yyyy')  ORDER BY date DESC, shares DESC, starred 
DESC LIMIT 3

Which gives this result:

        {
            "@type": "d",
            "@rid": "#-2:3",
            "@version": 0,
            "id": "#16:17",
            "shares": 0,
            "issue": "October",
            "date": "2014-11-19T23:00:00.000",
            "@fieldTypes": "date=t"
        },
        {
            "@type": "d",
            "@rid": "#-2:1",
            "@version": 0,
            "id": "#16:14",
            "shares": 0,
            "issue": "November Issue",
            "date": "2014-11-16T23:00:00.000",
            "@fieldTypes": "date=t"
        },
        {
            "@type": "d",
            "@rid": "#-2:9",
            "@version": 0,
            "id": "#16:23",
            "shares": 0,
            "issue": "2014-11-17",
            "date": "2014-11-16T23:00:00.000",
            "@fieldTypes": "date=t"
        }

However i want to filter using the shares field, which is zero for all the 
objects above, like this query:

SELECT in.@rid as id, in.inE("shared").size() as shares, in.issue as issue, 
date FROM (select expand(inE('published')) from publications ) WHERE 
 shares < 2 ORDER BY date DESC, shares DESC, starred DESC LIMIT 3

This query comes up empty handed, i cant seem to filter my result on this 
parameter, does anyone have any suggestions to why this is? Or any ideas 
how to solve this problem?

-- 

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