Wrote a Blog Post
Solving the knapsack problem in PostgreSQL
https://aiven.io/blog/solving-the-knapsack-problem-in-postgresql