public static function extractSelectClause($objClauses)
    {
        if ($objClauses instanceof Clause\Select) {
            return $objClauses;
        }

        if (is_array($objClauses)) {
            $hasSelects = false;
            $objSelect = QQ::select();
            foreach ($objClauses as $objClause) {
                if ($objClause instanceof Clause\Select) {
                    $hasSelects = true;
                    $objSelect->merge($objClause);
                }
            }
            if (!$hasSelects) {
                return null;
            }
            return $objSelect;
        }
        return null;
    }