fix: fix sql query