Finish filter query of Postgre Engiene