CODESTYLE fix
re-write SQL query
CODESTYLE improvement
Repeat interface