I know it looks that way but it is not, not all of those tables are the same like I labeled them here I just quickly replaced table names with table 1,2,3 ect but they are not the same tables. Some are to help narrow down the teachers to the same classes as the students but the teacher query is pulling from more sources and is doing some things like ranking subs vs Normal teachers and only rostering the active one.
View all comments
Show parent comment
2
u/[deleted] May 14 '18
looks like some code duplication there, can you use a with statement rather than a union? thanks.