I like it, Ive toyed with the idea of a SQL parser class in my framework for the purpose of running only on development/testing servers for advanced debugging (also things like efficiency scores). Although I wouldnt do in regex (prefering an objective parser, utilising the same parse tree as mysql).

Still a nice regex, certainly thorough.