chore(sql): use ${trueConstant} instead of 1

- replace 1 with ${trueConstant}
- remove redundant queries

related to #CAM-2900