Found further problems with AS . 

select 
unionall( out("HadProblems"))  as peopleWithProblems ,
unionall( in("Invited"))  as invitedPeople ,
unionall( in("Contestant")) as contestants
from (
 select 
  expand(out("OfType").in("OfType")) 
  from 
  Announcement 
  where 
  itemid = "java123"
  limit -1 
)
where 
 out("lecturer").out("Announced").itemid contains "java123"
limit -1 


returns 1 record with 3 columns,   called :  *unionall1*  , *unionall2* 
 and  *contestants*

And it should have been  *peopleWithProblems*,  *invitedPeople* ,  
*contestants*

On a side note, also tried to  use    *DISTINCT*   on all the Unionall 
methods , like so :  
  
distinct ( unionall( out("Contestant")) )

  and that didn't work either, showing multiple same objects on the 
resulting set.

Question is : am I doing something wrong ? Is anyone aware of this 
happening to them aswell ?

On Tuesday, January 27, 2015 at 5:44:55 PM UTC, syshex wrote:
>
> Simple example :
>
> select announcementNumber, count(*) as total from Announcement  group by 
> announcementNumber 
>
>
> I get a list of announcementNumber s and another column named total with 
> values ranging from 1 to 5 
>
> For my case here I just want to have an output when the total value 
> excedes 1:
>
> select announcementNumber, count(*) as total from Announcement where 
> total > 1 group by announcementNumber 
>
> returns nothing.
>
> Workaround I used :
>
> select *
> from (
>  select announcementNumber, count(*) as total from Announcement group by 
> announcementNumber 
> )
> where total > 1 
>
>
>
> On a side note, if I don't use "AS" to define the name I want to give the 
> columns, like so :
>
> select announcementNumber, count(*) from Announcement where count(*) > 1  
> group by announcementNumber 
>
> it return everything, like it did without the  Where clause. 
>
>

-- 

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