Hello all,
I'm designing my 2nd pivot grid, and the counts on the pivot grid are not the same as the raw data. The query I have is a grade distribution by division, term, subject, catalog, instructor, session, and mode. I then threw in the section number, hoping that would solve the problem. The SQL is below.
An example of one that is correct is PSY on the pivot grid has 1025 grades, which matches my raw data. But then ECON has 1002 for a count on the pivot grid, but the raw data is 873. I thought that it was a meeting pattern that was duplicating grades, so I limited the query to meeting pattern = 1, but then other numbers were different on other subjects. I also just noticed that the count for the term has a total of 8514, but the raw data is 8159.
Has anybody encountered their raw data being one number, but the pivot grid calculates a different number? Any suggestions on how I can get the pivot grid to calculate correctly?
Thank you!
Lee
SELECT DISTINCT A.EMPLID, C.DESCR, B.SUBJECT, B.CATALOG_NBR, E.NAME, B.SESSION_CODE, A.CRSE_GRADE_OFF, B.INSTRUCTION_MODE, B.CLASS_SECTION
FROM PS_STDNT_ENRL A, PS_CLASS_TBL B, PS_TERM_TBL C, PS_CLASS_INSTR_VW D, PS_PEOPLE_SRCH E
WHERE ( C.STRM = A.STRM
AND C.ACAD_CAREER = A.ACAD_CAREER
AND C.INSTITUTION = A.INSTITUTION
AND E.OPRCLASS = 'HCPPALL'
AND ( A.ACAD_CAREER = 'UGRD'
AND A.INSTITUTION = 'TMCC1'
AND A.STRM = '2252'
AND A.STDNT_ENRL_STATUS = 'E'
AND A.GRADING_BASIS_ENRL NOT IN ('NON','NOG','TEC')
AND A.ENRL_STATUS_REASON IN ('ENRL','EWAT','WDRW')
AND A.ACAD_CAREER = B.ACAD_CAREER
AND A.INSTITUTION = B.INSTITUTION
AND A.STRM = B.STRM
AND A.CLASS_NBR = B.CLASS_NBR
AND B.SESSION_CODE = A.SESSION_CODE
AND B.CRSE_ID = D.CRSE_ID
AND B.CRSE_OFFER_NBR = D.CRSE_OFFER_NBR
AND B.STRM = D.STRM
AND B.SESSION_CODE = D.SESSION_CODE
AND B.CLASS_SECTION = D.CLASS_SECTION
AND B.ACAD_GROUP IN ('T1540','T154U')
AND D.INSTR_ROLE = 'PI'
AND E.EMPLID = D.EMPLID
AND E.NAME_TYPE = 'PRI' ))
------------------------------
Lee Raubolt
Associate Director of Admissions and Records
Truckee Meadows Community College
------------------------------
Message from the HEUG Marketplace:------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the
HEUG Marketplace.
------------------------------