I have a problem connecting two collections on SlamData. First collection is Worker and there's an _id field in it. Second one is Order and there is an array of workers id's in it(called pracownicy). My query isn't working:
SELECT worker.nazwisko,SUM(orders.odleglosc)as "suma odleglosci",SUM(orders.cena)as "suma zarobku",SUM(orders.godz)as "suma godzin"
FROM "/test/test/Order" orders
JOIN "/test/test/Worker" worker ON orders.pracownicy=worker._id
GROUP BY worker.nazwiskoI know that this is wrong:
orders.pracownicy=worker._idbut i dont know how to fix it, i read about FIND_IN_SET and i tried but it didnt work neither. Im not even sure if it's implemented in slamdata.
I also tried
orders.pracownicy[*]=worker._idbut it didnt work anyway.
Is there any other way to do that?
orders.pracownicy[*]=worker._idorders.pracownicy[OID(*)]=worker._idOID(orders.pracownicy[*])=worker._id
OID(orders.pracownicy[*])=worker._id
--
You received this message because you are subscribed to a topic in the Google Groups "SlamData-User" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/slamdata-user/FfR1H23Olqc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to slamdata-use...@googlegroups.com.
Visit this group at https://groups.google.com/group/slamdata-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/slamdata-user/d2bcccf2-a8c2-42a0-bee7-e36c2b811a36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
OID(orders.pracownicy[*])=worker._id
To view this discussion on the web visit https://groups.google.com/d/msgid/slamdata-user/AE05126A-C456-421E-B335-0BE567E53987%40degoes.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/slamdata-user/CAK0%3DA%3DeSSZ8c39p4wL8E1KKzmedx2TXOFt%2BztQbp%2BgZ-1K-R-Q%40mail.gmail.com.