def getTopHashtags(dbconn,maxhashtags=8):
    """
    Return list of most frequent hashtags in database.
    """
    q = dbconn.cursor()
    q.execute('SELECT hashtag,COUNT(docid) AS num FROM hashtags \
                GROUP BY hashtag ORDER BY num DESC LIMIT ?',[maxhashtags])
    return [ row for row in q.fetchall() ]