Hi! So I was looking for query help... but I got help on IRC. I was having 
trouble with something like:


```
select count(both('Specializes').both('Provides')), name from Specialty 
where (both('Specializes').both('Accepts').name = 'aetna') group by name

```


However, I was really only missing the 'contains' there:
```
select count(both('Specializes').both('Provides')), name from Specialty 
where (both('Specializes').both('Accepts').name contains 'aetna') group by 
name

```

That gives me what I need... I was having trouble understanding how to 
query against attributes of vertexes... it's 'contains' in stead of '='

Topper

On Thursday, 7 May 2015 13:35:24 UTC-4, Topping Bowers wrote:
Hi guys, this is a bit convoluted, so I hope I can say this succinctly. I'm 
trying to figure out the sql that would let me count a vertex grouped by an 
attribute of a related vertex.


So... given: 
https://docs.google.com/drawings/d/1mHlchYalpFemOz_I_jSae_aWqBGmLu4acUzj4i3yucU/edit?usp=sharing


I would like to count the *providers* grouped by the name of the specialty.


So the result as shown in the graph would be:


chiropractor: 4
heart: 1


Bonus points if I could scope it by Flowers... so the output would be:


Chiropractor: 2
Specialty: 0


Thank you so much for your help!

-- 

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