Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Calculating a winning streak?

222 0
Showing results for 
Search instead for 
Did you mean: 

I am building a big trivia game for Alexa. I have a User table that keeps all of my relevant data about my users. This includes rollups from other tables.

I have another UserQuestion table that holds a record for each time that a user attempts to answer a question. They are timestamped, and marked with a checkbox as “Correct” or “Incorrect.”

I would like to be able to roll-up a user’s current streak of correct answers. So, for example, if they have gotten their last 4 questions right, my rollup field would show the number 4. If they get their next question wrong, I would want this counter to reset to zero.

I can do this in my application logic, but that requires querying this base every time, and doing the calculation on the fly. I’m trying to get Airtable to do the heavy lifting for me.

Any recommendations?

0 Replies 0