▲ | magicalhippo 15 hours ago | |
I've mostly kept the usage to "sane" stuff like turning delimiter-separated text into rows, or walking a graph. As much as I enjoy the Mandelbrot set, I bought the Fractint book as a kid, anyone done any outlandish but useful recursive queries? PS: awesome explanation of how exactly the recursive query works. Wish I had read it when I first needed it in some other DB which help did not have such a clear explanation. Tore out a lot of hair before I got it working right. | ||
▲ | airstrike 13 hours ago | parent | next [-] | |
12 years ago I wrote a recursive CTE which aggregated a bunch of accounting journal entries from pretty big SAP extracts with intermediate account also needing to be calculated in a way that rolled up to company-level values, with some tagging/indexing in the process. I remember only being able to finish the query after some kind anon helped me in an IRC channel at 4am on a weeknight... to this day I'm immensely grateful to them I made it into a neat little Django portal with configurable permissions, interactive charts for the data, filtering, etc. It became a ~10-min async celery task running in the background from what previously used to take the company weeks to create that report in an error prone way with macros written by someone long gone / in another department. I'm still pretty proud of that app even though it never got implemented. I got promoted, moved to a different department and don't think it ever saw the light of day, but I do have the code laying around somewhere | ||
▲ | JaggerFoo 12 hours ago | parent | prev | next [-] | |
Years ago I came across a Knapsack problem solution written in Oracle SQL, that I adapted to Daily Fantasy Golf. Here's the source: https://aprogrammerwrites.eu/?p=878 Cheers | ||
▲ | hobs 14 hours ago | parent | prev [-] | |
Last time it was useful I re-implemented XIRR(https://support.microsoft.com/en-us/office/xirr-function-de1...) using Excel's approach in pure SQL so it would be able to make the finance bros happy, it was something like 50,000x faster than the user defined function/loop approach. |