-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsqlReport.txt
48 lines (48 loc) · 2.24 KB
/
sqlReport.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<ReportName>Children in Foster Care</ReportName>
<ReportTitle>Children in Foster Care</ReportTitle>
<ReportGroup>Custom State reports</ReportGroup>
<ReportDescription></ReportDescription>
<SQLQuery>SELECT
s.lastfirst,
ps_customfields.getstudentscf(s.id, 'wps_cfc_LegalDistrict'),
'130',
ps_customfields.getstudentscf(s.id, 'wps_cfc_tuitionPaid'),
ps_customfields.getstudentscf(s.id, 'wps_cfc_typeOfPlacement'),
ps_customfields.getstudentscf(s.id, 'wps_cfc_nameOfFosterHome'),
ps_customfields.getstudentscf(s.id, 'va_primary_dis_code'),
ps_customfields.getstudentscf(s.id, 'wps_cfc_ohiDescription'),
sum(psada.membershipvalue),
ps_customfields.getstudentscf(s.id, 'wps_cfc_remedialSummerSchool')
FROM students s
JOIN ps_adaadm_defaults_all psada ON s.id = psada.studentid
JOIN terms t ON t.schoolid = psada.schoolid
WHERE
ps_customfields.getstudentscf(s.id, 'wps_cfc_foster') = 1
AND t.yearid = 22
and t.isyearrec = 1
AND psada.calendardate BETWEEN t.firstday AND t.lastday
GROUP BY
s.lastfirst,
ps_customfields.getstudentscf(s.id, 'wps_cfc_LegalDistrict'),
'130',
ps_customfields.getstudentscf(s.id, 'wps_cfc_tuitionPaid'),
ps_customfields.getstudentscf(s.id, 'wps_cfc_typeOfPlacement'),
ps_customfields.getstudentscf(s.id, 'wps_cfc_nameOfFosterHome'),
ps_customfields.getstudentscf(s.id, 'va_primary_dis_code'),
ps_customfields.getstudentscf(s.id, 'wps_cfc_ohiDescription'),
ps_customfields.getstudentscf(s.id, 'wps_cfc_remedialSummerSchool')</SQLQuery>
<ReportHeader><th>Name</th><th>legalDistrict</th><th>receivingDistrict</th><th>Tuition Paid to serving?</th><th>Type of Placement</th><th>Name of Foster Home</th><th>Primary disability code</th><th>OHI Description</th><th>Membership</th><th>Remedial Summer School</th></ReportHeader>
<CreateStudentSelection>0</CreateStudentSelection>
<StudentSelectionQuery></StudentSelectionQuery>
<IncludeRowNumber>0</IncludeRowNumber>
<OpeninNewWindow>0</OpeninNewWindow>
<ParameterName1></ParameterName1>
<ParameterVal1></ParameterVal1>
<ParameterName2></ParameterName2>
<ParameterVal2></ParameterVal2>
<ParameterName3></ParameterName3>
<ParameterVal3></ParameterVal3>
<ParameterName4></ParameterName4>
<ParameterVal4></ParameterVal4>
<ParameterName5></ParameterName5>
<ParameterVal5></ParameterVal5>