fix: sql query