Created sql condition