'Get the updated queries.'

@expose(u'/queries/<last_updated_ms>')
def queries(self, last_updated_ms):

    stats_logger.incr(u'queries')
    if (not g.user.get_id()):
        return json_error_response(u'Please    login    to    access    the    queries.', status=403)
    last_updated_ms_int = (int(float(last_updated_ms)) if last_updated_ms else 0)
    last_updated_dt = (utils.EPOCH + timedelta(seconds=(last_updated_ms_int / 1000)))
    sql_queries = db.session.query(Query).filter((Query.user_id == g.user.get_id()), (Query.changed_on >= last_updated_dt)).all()
    dict_queries = {q.client_id: q.to_dict() for q in sql_queries}
    return json_success(json.dumps(dict_queries, default=utils.json_int_dttm_ser))
