def METHOD_NAME(trending_problems,
                     start_date,
                     end_date):
    def _perform_query(problem, start_date):
        sql = """
                 SELECT COUNT(id)
                 FROM `submission`
                 WHERE ((problem_link = '%s')
                   AND  (time_stamp >= '%s'))
                 GROUP BY user_id, custom_user_id
              """ % (problem["submission"]["problem_link"],
                     start_date)
        res = db.executesql(sql)
        problem["unique"] = len(res)
    threads = []
    for problem in trending_problems:
        threads.append(gevent.spawn(_perform_query, problem, start_date))
    gevent.joinall(threads)
    return trending_problems