code: public function whereExists(
          SelectStatementInterface $sel, $and = true, $not = false
      ) {
          $ext = $not ? 'NOT EXISTS' : 'EXISTS';
          return $this->where(null, $ext, $sel, $and);
      }
docs: {@inheritDoc}