issue 4832: fix sql query