how to use co related query sought of operation with Oreint DB

27 views
Skip to first unread message

lovaraju...@gmail.com

unread,
Nov 9, 2015, 8:24:07 AM11/9/15
to OrientDB
Hi Team,

 I have two vertices (USERS) abc  and (USER_GROUP )  xyz  connected with an edge USER_USER_GROUP, I want the o/p as

abc         xyz

my query is select in,USER_GROUP_ID FROM USER_USER_GROUP gives RID as well as USER_GROUP_ID, the RIDs have user_id so i want to extract the user id from the RID. 
I am not able to use 
select expand(in),user_group_id from user_user_group  


is there some co related query sought of in oreint db


in the screen shot i want to expand in with in the query it self




select in,USER_GROUP_ID from user_user_group
Run: Ctrl + Return Undo: Ctrl/Cmd + Z Redo: Ctrl/Cmd + Shift + Z 
Search : Ctrl/Cmd + F Toggle Comment: Ctrl/Cmd + / Autocomplete: Ctrl + Space
PROPERTIES
in
USER_GROUP_ID
#12:1USER_GROUP_SD0011
#12:2USER_GROUP_SD0011
#12:3USER_GROUP_SD0011
#12:4USER_GROUP_SD0011
#12:5USER_GROUP_SD0011
#12:6USER_GROUP_SD0011
#12:7USER_GROUP_SD0011
#12:8USER_GROUP_SD0011
#12:0USER_GROUP_SD00126
#12:0USER_GROUP_SD00126

thanks in advance
lova raju 



alessand...@gmail.com

unread,
Nov 9, 2015, 9:05:40 AM11/9/15
to OrientDB
Try this query
select out.user_id,in.user_group_id from USER_USER_GROUP

Kind regards,
Alessandro

Lova Raju Allumalla

unread,
Nov 9, 2015, 11:27:59 PM11/9/15
to orient-...@googlegroups.com
Dear Alessandro,

Thank you very much your approach worked with slight modification

select in.USER_ID,USER_GROUP_ID from USER_USER_GROUP GROUP

Thanks for the timely help.

Thanking You,
With Best Regards,
Lova Raju Allumalla

--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/abg8R8WniNk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages