Fixed error sql.
Merge branch 'feature/check_query' into develop