A lifetime ago I did a stint as an Oracle consultant and 100% this. A gigantic sql query was always the answer no matter the question. I remember using sql queries to generate pdf and ps file output that would stream directly to printer feeds. So many “concat”s in that massive blob and nearly impossible to maintain for the next poor soul who had to own the code.
Learned a lot about db best practices to make these systems resilient and reportable but the whole “the database is the system” angle was very much a “every problem is a nail to this hammer” situation.