Grouping by table id
Options
![Jordan Bundy](https://us.v-cdn.net/6037124/user_avatars/1378889.jpg)
Jordan Bundy
Member ✭
Hi everyone!
I'm having an interesting issue, I'll be very interested to see if anyone can shed some light. Basically, I have a query that left joins two tables and aggregates the number of instances each entry has. To be more specific, the left side is user identities, and the right side is reviews, so I'm trying to count how many reviews exist for each user.
The problem is, I'm grouping by the id of the left table. It was working fine, but at some point in the last couple days it seems to have stopped working. It's hard to troubleshoot, because there's no debug log; Xano throws an error that an unknown error occurred.
The only clue I have is that if I group the values by something like name, it works, but for my function I specifically need the id. Any thoughts?
I'm having an interesting issue, I'll be very interested to see if anyone can shed some light. Basically, I have a query that left joins two tables and aggregates the number of instances each entry has. To be more specific, the left side is user identities, and the right side is reviews, so I'm trying to count how many reviews exist for each user.
The problem is, I'm grouping by the id of the left table. It was working fine, but at some point in the last couple days it seems to have stopped working. It's hard to troubleshoot, because there's no debug log; Xano throws an error that an unknown error occurred.
The only clue I have is that if I group the values by something like name, it works, but for my function I specifically need the id. Any thoughts?
Comments
-
Hi if you are comfortable with it, send me a direct message with the browser URL of where this query is in your workspace and any inputs I may need to test it and I can take a closer look for you.
-
, I hit the same issue. I ended up adding the id as an eval so it was on the results twice. I could then group by that duplicate id without getting errors.
-
A note: I just realized some queries that were previously functional were no longer working. Troubleshooting revealed that grouping by id was the issue. So in case it's helpful to the Xano team, we know that it was possible to group by id in the past, just not anymore. I'm going through now and implementing my workaround (pretty easy).
-
It's good to know that someone else can confirm that the capability changed. I could add it in the eval, but the whole reason I was doing it this way was so that I could account for items that have 0 results (basically, users who have not yet done a review). When I group by some other property, it actually ignores the items that don't have matches, even though I'm doing a left join.
thanks for the offer! Right now, I had to implement a workaround, and since we can do versioning I actually don't have the example anymore. Next time I have the same situation, I'll get back in touch.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback