more complete support for sql language

1. code refactoring
2. added all common sql keywords, including order by, asc, desc, group by, having