#45 removed query grouping - fixed sql using bindings