Grouping by table id

Options
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?

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    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. 
  • Erin Wagner
    Erin Wagner Member
    Options
    , 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.
  • Erin Wagner
    Erin Wagner Member
    Options
    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).
  • Jordan Bundy
    Jordan Bundy Member
    Options
     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.