You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gradeGroup2="(Student_Grade = 1 or Student_Grade = 2)";
466
+
gradeGroup3="(Contact.Student_Grade = 1 or Contact.Student_Grade = 2)";
467
+
}elseif(grade==="7"||grade==="8"){
468
+
gradeGroup="7;8";
469
+
gradeGroup2="(Student_Grade = 7 or Student_Grade = 8)";
470
+
gradeGroup3="(Contact.Student_Grade = 7 or Contact.Student_Grade = 8)";
471
+
}else{
472
+
gradeGroup=grade;
473
+
gradeGroup2=`Student_Grade = ${grade}`;
474
+
gradeGroup3=`Contact.Student_Grade = ${grade}`;
475
+
}
476
+
477
+
letcurrentPage=0;
478
+
constattempts=[];
479
+
while(true){
480
+
constattemptsQuery=`select Contact_Name.id as contactId, Contact_Name.Email as Email,Contact_Name.Student_Grade as Student_Grade, Quiz_Score, Contact_Name.Coins as Coins, Session.Number_of_Questions as Total_Questions from Attempts where Session_Date_Time between '${formattedDateStart}' and '${formattedDateEnd}' and Session.Session_Grade = '${gradeGroup}' limit ${
constcontactQuery=`select Email, Student_Grade, Student_Name, Referral_Count from Contacts where ((Referral_Count is not null and Blocked = false) and ${gradeGroup2}) order by Referral_Count desc limit 2000`;
523
+
constordersQuery=`select Contact.Email as Email, Contact.Student_Grade as Student_Grade, Contact.Student_Name as Student_Name from Orders where (${gradeGroup3} and (Order_Date between '${monday.format(
524
+
"YYYY-MM-DD"
525
+
)}' and '${sunday.format("YYYY-MM-DD")}')) limit 2000`;
526
+
527
+
constcoinsQuery=`select Contact.Email as Email, Contact.Student_Grade as Student_Grade, Contact.Student_Name as Student_Name, Coins from Coins where (((Updated_Date between '${monday.format(
528
+
"YYYY-MM-DD"
529
+
)}' and '${sunday.format(
530
+
"YYYY-MM-DD"
531
+
)}') and (Action_Type = 'Credit')) and ${gradeGroup3}) limit 2000`;
532
+
533
+
constmegaLuckyDrawQuery=`select Contact.Email as Email, Contact.Student_Grade as Student_Grade, Contact.Student_Name as Student_Name, Coins, Updated_Date, Description from Coins where (((Updated_Date between '${monday2.format(
534
+
"YYYY-MM-DD"
535
+
)}' and '${sunday2.format(
536
+
"YYYY-MM-DD"
537
+
)}') and (Description like '%intro%')) and ${gradeGroup3}) limit 2000`;
constattemptsQuery=`select Contact_Name.id as contactId, Contact_Name.Email as Email,Contact_Name.Student_Grade as Student_Grade, Quiz_Score, Contact_Name.Coins as Coins, Session.Number_of_Questions as Total_Questions from Attempts where Session.Session_Grade = '${gradeGroup}' limit ${
0 commit comments