Added support for merging dynamic where with sql with existing static where