How to build a view table that would list student/tutor records that sums the hours by Year/Month

Samar A
Tera Contributor

Need your help to build a view to list students, tutor class, the sum of tutor hours, and grouped by year/month.  In SQL one can join the tables, sum the hours and group by year/Month.  Need your help to build a similar view in ServiceNow.  

 

Table-1 that lists all the students and the tutor class they have enrolled in. 

Table-2 tracks all the tutoring date and hours. 

 

 The requirement is a report to list he students in each class and the sum of tutor hours in each year/month.

 

Table-1:student tutor class enrollment

Nam2        Class      MaxHours

Student-1 Math      15

Student-1 Writing  10

Student-2 Math      12

 

Table-2: Tutor sessions

Student-1 Math     07.01.24   2 hr

Student-1 Math     08.10.24   2 hr

Student-1 Math     08.13.24   1 hr

Student-1 Writing 08.03.24   1 hr

Student-2 Math     07.03.24   1 hr

Student-2 Math     08.08.24   1 hr

Student-2 Math     08.18.24   2 hr

 

Report to list that also enables the user to export.

Name        Class      Max  July24   August24

Student-1 Math      15      2 hr       3 hr

Student-1 Writing   10     0            1 hr

Student-2 Math       12    1 hr       3 hr

 

Thanks.

0 REPLIES 0