def insert_hash_group(self,tweet):
        #text TEXT, group_id TEXT, day DATE, total INT
        hashtags = tweet['entities']['hashtags']
        date=  time.strftime('%Y-%m-%d', time.strptime(tweet['created_at'],'%a %b %d %H:%M:%S +0000 %Y'))
        for h in hashtags:
            hashtag = h['text']
            try:
                    cursor = self.con.cursor()
                    cursor.execute("SELECT text, total from hash_group WHERE ( text='"+hashtag+"' AND group_id = 'ALDE' AND day = '"+str(date)+"')")
                    node = cursor.fetchone()
                    if node:
                        total = node[1]+1
                        cursor.execute("UPDATE hash_group set total = "+str(total)+"  WHERE ( text='"+hashtag+"' AND group_id = 'ALDE' AND day = '"+str(date)+"')")
                    else:
                        insert = "INSERT INTO hash_group(text, group_id, day, total) VALUES ('"+hashtag+"','"+"ALDE"+"','"+str(date)+"','"+str(1)+"' )"
                        cursor.execute(insert)
            except Exception, e:
                print "DB Error - insert_hash_group: ", e