protected function getLastSearchesResultSet($limit) : array
    {
        $queryBuilder = $this->getQueryBuilder();
        return $queryBuilder
            ->select('keywords')
            ->addSelectLiteral(
                $queryBuilder->expr()->max('tstamp','maxtstamp')
            )
            ->from($this->table)
            // There is no support for DISTINCT, a ->groupBy() has to be used instead.
            ->groupBy('keywords')
            ->orderBy('maxtstamp', 'DESC')
            ->setMaxResults($limit)->execute()->fetchAll();
    }
protected function getLastSearchesResultSet($limit) : array
    {
        $queryBuilder = $this->getQueryBuilder();
        return $queryBuilder
            ->select('keywords')
            ->addSelectLiteral(
                $queryBuilder->expr()->max('tstamp','maxtstamp')
            )
            ->from($this->table)
            // There is no support for DISTINCT, a ->groupBy() has to be used instead.
            ->groupBy('keywords')
            ->orderBy('maxtstamp', 'DESC')
            ->setMaxResults($limit)->execute()->fetchAll();
    }
protected function getLastSearchesResultSet ( $ limit ) : array { $ queryBuilder = $ this -> getQueryBuilder ( ) ; return $ queryBuilder -> select ( 'keywords' ) -> addSelectLiteral ( $ queryBuilder -> expr ( ) -> max ( 'tstamp' , 'maxtstamp' ) ) -> from ( $ this -> table ) // There is no support for DISTINCT, a ->groupBy() has to be used instead. -> groupBy ( 'keywords' ) -> orderBy ( 'maxtstamp' , 'DESC' ) -> setMaxResults ( $ limit ) -> execute ( ) -> fetchAll ( ) ; }
Returns all last searches

@param $limit
@return array
Returns all last searches