Recorded by Deseree Probasco
* = modified
Demographics -> Contact Query
SELECT distinct A.EMPLID, b.LAST_NAME, b.FIRST_NAME, A.ADDRESS1, A.ADDRESS2, A.CITY, A.STATE, A.POSTAL,
e.email_addr, d.phone as homePhone, c.phone as cellPhone
FROM PS_PERSON_address A
left join ps_person_name b on (A.EMPLID = b.EMPLID)
Left Join Ps_Personal_Phone C On (A.Emplid = C.Emplid And C.Phone_Type = 'CELL')
Left Join Ps_Personal_Phone D On (A.Emplid = D.Emplid And D.Phone_Type = 'HOME')
left join ps_email_addresses e on (A.EMPLID = e.EMPLID and e.e_addr_type = 'CAMP')
where a.address_type = 'HOME'
and a.emplid in
(select distinct emplid from ps_stdnt_enrl
where acad_career = 'CR'
And Strm = '1131'
and stdnt_enrl_status = 'E')
GPA and Credit Hours -> Credit Hours No Dev Crs with Sum
select a.emplid, sum(a.unt_earned) as totCreds
from ps_stdnt_enrl a,
ps_class_tbl b
where a.strm <= '1131'
and a.stdnt_enrl_status = 'E'
and a.acad_career = 'CR'
and a.crse_grade_off in ('A','B','C','D')
and b.class_stat in ('A','S')
and b.class_type = 'E'
and a.repeat_code <> 'EXCL'
and a.strm = b.strm
and a.session_code = b.session_code
and a.class_nbr = b.class_nbr
and a.emplid in (
select z.emplid
from ps_stdnt_enrl z
where z.strm in ('1131')
and z.stdnt_enrl_status = 'E'
and z.acad_career = 'CR'
and a.emplid = z.emplid)
and b.crse_id not in (select crse_id from ps_crse_attributes where crse_attr = 'DEV')
having sum(a.unt_earned) >= '30'
group by a.emplid
Other - > Plan Query
SELECT DISTINCT A.STRM, B.CAMPUS, A.EMPLID, C.ACAD_PLAN, D.DESCR, D.ACAD_PLAN_TYPE,
B.PROG_STATUS,D.INSTITUTION,D.ACAD_PLAN,TO_CHAR(D.EFFDT,'YYYY-MM-DD')
FROM sysadm.ps_STDNT_ENRL A, sysadm.ps_ACAD_PROG B, sysadm.ps_ACAD_PLAN C, sysadm.ps_ACAD_PLAN_TBL D
WHERE A.ACAD_CAREER = 'CR'
AND A.STRM = '1131'
AND A.STDNT_ENRL_STATUS = 'E'
AND A.EMPLID = B.EMPLID
AND A.ACAD_CAREER = B.ACAD_CAREER
AND B.EFFDT =
(SELECT MAX(B_ED.EFFDT) FROM sysadm.ps_ACAD_PROG B_ED
WHERE B.EMPLID = B_ED.EMPLID
AND B.ACAD_CAREER = B_ED.ACAD_CAREER
AND B.STDNT_CAR_NBR = B_ED.STDNT_CAR_NBR
AND B_ED.EFFDT <= SYSDATE)
AND B.EFFSEQ =
(SELECT MAX(B_ES.EFFSEQ) FROM sysadm.ps_ACAD_PROG B_ES
WHERE B.EMPLID = B_ES.EMPLID
AND B.ACAD_CAREER = B_ES.ACAD_CAREER
AND B.STDNT_CAR_NBR = B_ES.STDNT_CAR_NBR
AND B.EFFDT = B_ES.EFFDT)
AND B.EMPLID = C.EMPLID
AND B.ACAD_CAREER = C.ACAD_CAREER