Replies: 1 comment
-
That would be easier to answer if you posted the question and the tables we're talking about as well. It sounds correct though. If you want to count tags for each users, join the two tables together and select |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Yes, your understanding is correct. Suppose a user has 2 tags, if you add tags.name.count() in addColumns, then the groupBy query will only produce 1 row, whereas if you add tags.name in addColumns, then the groupBy query will produce 2 rows. This is because groupBy groups the data by the specified columns, and then performs aggregation operations on each group of data, such as counting, summing, averaging, etc. If you want to get the tag count for each user, you can use tags.name.count() to calculate the tag count for each group of data. If you want to get all the tag rows for each user, you can use tags.name to list the tag names for each group of data. I hope this information is helpful to you. If you have any other questions, please feel free to ask. 😊
Beta Was this translation helpful? Give feedback.
All reactions