Hi Michael, Just add a DISTINCT to the RETURN, ie
RETURN DISTINCT driver.@rid AS DriverID, driver.name AS DriverName, car.cost AS CarCost Thanks Luigi Il giorno mer 6 mar 2019 alle ore 22:46 Michael Faughn < m.fau...@prometheuscomputing.com> ha scritto: > SELECT * FROM (MATCH {Class: Person, as: driver, where:(name='Bob')}- > Driving->{Class: Vehicle, as:car} RETURN driver.@rid AS DriverID, driver.name > AS DriverName, car.cost AS CarCost) > > results in the following: > > DriverID > DriverName > CarCost > #332:0 > <http://localhost:2480/studio/index.html#/database/test/browse/edit/332:0> > Bob > 222 > #332:0 > <http://localhost:2480/studio/index.html#/database/test/browse/edit/332:0> > Bob > 111 > > I would instead like the following: > > DriverID > DriverName > CarCost > #332:0 > <http://localhost:2480/studio/index.html#/database/test/browse/edit/332:0> > Bob > [222, 111] > > Is there a way to write the query so that this can happen? > > -- > > --- > 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 orient-database+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- --- 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 orient-database+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.