One way to approach it would be to have a grab bag of templates. You drag a template like "SELECT ... FROM ... WHERE ..." out into the editor and then tab through it filling in the blanks.
I've always thought that SQL's notion of readability was somewhere between superficial and disingenuous - you can read the query and it sounds like it ought to make sense, but there's so many occasions where you won't actually be able to understand why it isn't working unless you know how to translate in your head from the order in which the clauses are written, to the order in which they're carried out.
True - but so much of the value of autocomplete comes from just being able to try things out:
'from customers, orders select ...'
Would allow showing a whole bunch of columns, and you could quickly determine whether those tables had the information you're after, or not.
It might seem strange/lazy that the developer can explore the environment (schema) this way without 'knowing' what's out there, but in practice that's exactly what we all do with software development, web search, etc - we try things out and see what comes back, rather than knowing in the first place. Data development has a way to go, but I think things will improve..
Actually, one alternative approach would be: use a search index to autocomplete after even a basic 'SELECT' statement (no other context), but then fill the FROM clause based on the selection.
i.e. - type:
'select city'
prompts with:
'city (table airports)'
'city (table populations)'
'city (table companies)'
And then, upon selection, you have a statement: 'select city from <selected-table>'.
There's a lot more here though. Worth pondering for a while I think.
I've always thought that SQL's notion of readability was somewhere between superficial and disingenuous - you can read the query and it sounds like it ought to make sense, but there's so many occasions where you won't actually be able to understand why it isn't working unless you know how to translate in your head from the order in which the clauses are written, to the order in which they're carried out.