Here's my rationale for voting to migrate your question:
This was a programming question. It was not about using a particular database management system or software. As such, it was not on topic here and belonged on Stack Overflow instead.
As for the difference between your question and VBA questions, the key difference is that VBA does not exist in isolation. It is a language that is necessarily tied to Microsoft Office software, questions about which are within the scope of Super User. As stated above, your question was purely about SQL syntax, not about using software. Hence, it wasn't a very good fit for Super User.
There is precedence for VBA questions being migrated to Stack Overflow, too. When a question is purely about syntax, or, for lack of better description, about programmer-level issues (as opposed to user-level issues), it can be migrated to SO.
For what it's worth, having a question migrated isn't a bad thing. If anything, your question will have a better audience on Stack Overflow. That was my motivation for migrating -- to improve your chances of getting a useful answer.
More reading about related topics:
Inconsistent Mod response to migrating Excel questions between Stack OverFlow & Super User
Are detailed Excel VBA questions best posed here or on Stack Overflow?
Reminder on voting to migrate