I am not telling to put the SQL in the db, it will be in code tracked with git and potentially unit tested. If that does not aid maintainability I am not super sure what will :).
I agree with your 2nd point generally. Thanks!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.