src/Zf2Forum/Model/Category/CategoryMapper.php
public function getCategories()
    {
        $select = $this->getSelect();
        $select->join(array(
            't' => 'forum_topic'
        ), 't.forum_category_id = forum_category.id', array(
            'thread_count' => new Expression('COUNT(DISTINCT t.id)')
        ), 'left')
            ->join(array(
                'r' => 'forum_reply'
            ), 'r.forum_topic_id = t.id', array(
                'last_post' => new Expression(
                    'greatest(MAX(t.timestamp_updated), if(MAX(t.timestamp_updated), MAX(t.timestamp_updated), 0))'
                ),
                'message_count' => new Expression('COUNT(r.id)')
            ), 'left')
            ->group(array(
                'forum_category.id'
            ));
        return $this->select($select);
    }
public function getCategories()
    {
        $select = $this->getSelect();
        $select->join(array(
            't' => 'forum_topic'
        ), 't.forum_category_id = forum_category.id', array(
            'thread_count' => new Expression('COUNT(DISTINCT t.id)')
        ), 'left')
            ->join(array(
                'r' => 'forum_reply'
            ), 'r.forum_topic_id = t.id', array(
                'last_post' => new Expression(
                    'greatest(MAX(t.timestamp_updated), if(MAX(t.timestamp_updated), MAX(t.timestamp_updated), 0))'
                ),
                'message_count' => new Expression('COUNT(r.id)')
            ), 'left')
            ->group(array(
                'forum_category.id'
            ));
        return $this->select($select);
    }
getTags

@return array of CategoryInterface's