// var xx = moment(end).add(1, 'day').format('YYYY-MM-DD HH:mm')
// console.log(xx);
// console.log(xx);
varsql2=`select count(*) from battle_history where type ='athletic' and isfirstwin='t' and ( (usernameA = '${username}' AND userscorea > userscoreb ) OR (usernameB = '${username}' AND userscoreb > userscorea) ) and start_time > '${activity.start}' and start_time < '${activity.end}' `
varsql2=`select count(*) from battle_history where type ='athletic' and isfirstwin='t' and ( (usernameA = '${username}' AND userscorea > userscoreb ) OR (usernameB = '${username}' AND userscoreb > userscorea) ) and start_time > '${activity.start}' and start_time < '${activity.end}' `