fighting with mysql statements to pull reports from the LMS