Here's a nice post-Diana enhancement for the SQL language.
Let's assume I'm writing a where clause of the form "a.some_column = c.other_column" ('a' and 'c' are table aliases).
Smart completion could be provided after 'c.' based on data type of the columns involved.
For example, if some_column is of a numeric type, smart completion could only suggest columns of numeric type from the table referenced by 'c' alias.
Let's assume I'm typing a clause like a.id = b.<caret>.
If table referenced by b alias has foreign key columns to column id of table referenced by a alias it could give such variants higher priority.
Typing out joins would become Ctrl-Shift-Space, Ctrl-Shift-Space