-
I saw a response #71 here about left join, but still, it's puzzling for me how to create left join with multiple rows.
But in this approach when we have a lot of fields in the table, we will have a problem with duplication. PS. Thanks for all your work, Evgeniy, and the contributors, logica is really a powerful tool. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Hello @Stetsyk , We can pull multiple parameters with one aggregating expression as so
This appears reasonably concise to me. Please let me know if you have further questions or comments. And thank you for your supportive feedback! |
Beta Was this translation helpful? Give feedback.
-
Hi @EvgSkv, Yes, it's a much better way:) Thank you for your prompt reply! |
Beta Was this translation helpful? Give feedback.
-
Hi @EvgSkv , I still have an answer considering left join, when the second table in left join may have more than one row with a given key. I will show with example what I mean. Employee(name: "Alice", role: "Product Manager", office: "SEA"); And I want EmployeeLocation to consist of: Could you please help? |
Beta Was this translation helpful? Give feedback.
-
@Stetsyk sure, that's a great question! @rvalek thanks for this option! Here is my couple ways of doing it. When I said do it with lists I meant something like this:
On BigQuery the disjunct would be But now I think that this way might be more readable:
The logic in the second approach is very close to how we would formulate the query naturally: Let me know if you have further questions! |
Beta Was this translation helpful? Give feedback.
-
@rvalek, @EvgSkv thank you very much for your responses, all of them work. @EvgSkv the last method suggested by you is awesome!) |
Beta Was this translation helpful? Give feedback.
Hello @Stetsyk ,
We can pull multiple parameters with one aggregating expression as so
This appears reasonably concise to me.
Please let me know if you have further questions or comments.
And thank you for your supportive feedback!