zorn / flick

WIP. A simple Elixir / Phoenix LiveView app to help capture ranked votes.
https://flick-ysjm.onrender.com
MIT License
3 stars 0 forks source link

Consider pure SQL query to generate vote report. #42

Open zorn opened 1 month ago

zorn commented 1 month ago

The first pass at the vote report is done in memory. I attempted to do this in SQL but did not figure it out.

https://github.com/zorn/flick/blob/6366d193cc3439e1f7d6783908fffc2d0338e0e7/lib/flick/ranked_voting.ex#L225-L243

I think this solution is acceptable for now, but ideally, I would come up with a pure SQL solution.