EN: ff AND: ll)) ) ;. SQL.Add ( GROUP BY id_student );.Parameters.ParamByName ( ff ). Value:=DateToStr ( DateTimePicker1.Date);.Parameters.ParamByName(laquo;llraquo;).Value:=DateToStr(DateTimePicker2.Date);.Open;ADOQuery2.RecordCountgt;0 then:=ADOQuery2.RecordCount:=0; p gt; 0 then:=(p * 100)/vsego; ch gt; 0 then:=(ch * 100)/vsego; tr gt; 0 then:=(tr * 100)/ vsego; dva gt; 0 then:=(dva * 100) /vsego;.Variables [ pred ]:=QuotedStr ( Успішність студентів по предмету raquo;+DBLookupComboBox2.Text);.Variables[laquo;pyatraquo;]:=FloatToStr(ot);.Variables[laquo;chetraquo;]:=FloatToStr(xo);.Variables[laquo;triraquo;]:=FloatToStr(ud);.Variables[laquo;dvaraquo;]:=FloatToStr(pl);.PrepareReport;.ShowPreparedReport;;TForm10.Button3Click(Sender: TObject) ;, ch, tr, dva, vsego: integer;, xo, ud, pl: real; .Close; .SQL.Clear; .SQL.Add ( Select AVG (Ocenka.Ocenka), Ocenka.id_student ) ;. SQL.Add ( From Ocenka INNER JOIN Student ON Ocenka.id_student=Student.id_student ) ;. SQL.Add ( WHERE ((Id_gruppi= + IntToStr (DBLookupComboBox1.KeyValue) + ) AND (Data BETWEEN: ff AND: ll)) ) ;. SQL.Add ( GROUP BY Ocenka.id_student ) ;. SQL.Add ( HAVING AVG (Ocenka.Ocenka)=2 ) ;. Parameters.ParamByName ( ff ). Value:=DateToStr ( DateTimePicker3.Date);.Parameters.ParamByName(laquo;llraquo;).Value:=DateToStr(DateTimePicker4.Date);.Open;ADOQuery2.RecordCountgt;0 then:=ADOQuery2.RecordCount:=0; .Close; .SQL.Clear; .SQL.Add ( Select AVG (Ocenka.Ocenka), Ocenka.id_student ) ;. SQL.Add ( From Ocenka INNER JOIN Student ON Ocenka.id_student=Student.id_student ) ;. SQL.Add ( WHERE ((Id_gruppi= + IntToStr (DBLookupComboBox1.KeyValue) + ) AND (Data BETWEEN: ff AND: ll)) ) ;. SQL.Add ( GROUP BY Ocenka.id_student ) ;. SQL.Add ( HAVING AVG (Ocenka.Ocenka)=3 OR AVG (Ocenka.Ocenka)=4 OR AVG (Ocenka.Ocenka)= 5 ??raquo;) ;. Parameters.ParamByName ( ff ). Value:=DateToStr ( DateTimePicker3.Date);.Parameters.ParamByName(laquo;llraquo;).Value:=DateToStr(DateTimePicker4.Date);.Open;ADOQuery2.RecordCountgt;0 then:=ADOQuery2.RecordCount:=0; .Close; .SQL.Clear; .SQL.Add ( Select AVG (Ocenka.Ocenka), Ocenka.id_student ) ;. SQL.Add ( From Ocenka INNER JOIN Student ON Ocenka.id_student=Student.id_student ) ;. SQL.Add ( WHERE ((Id_gruppi= + IntToStr (DBLookupComboBox1.KeyValue) + ) AND (Data BETWEEN: ff AND: ll)) ) ;. SQL.Add ( GROUP BY Ocenka.id_student ) ;. SQL.Add ( HAVING (AVG (Ocenka.Ocenka)=4 OR AVG (Ocenka.Ocenka)=5) ) ;. Parameters.ParamByName ( ff ). Value:=DateToStr ( DateTimePicker3.Date);.Parameters.ParamByName(laquo;llraquo;).Value:=DateToStr(DateTimePicker4.Date);.Open;ADOQuery2.RecordCountgt;0 then:=ADOQuery2.RecordCount
Додаток Б
(продовження)
else:=0; .Close; .SQL.Clear; .SQL.Add ( Select AVG (Ocenka.Ocenka), Ocenka.id_student ) ;. SQL.Add ( From Ocenka INNER JOIN Student ON Ocenka.id_student=Student.id_student ) ;. SQL.Add ( WHERE ((Id_gruppi= + IntToStr (DBLookupComboBox1.KeyValue) + ) AND (Data BETWEEN: ff AND: ll) ) ) ;. SQL.Add ( GROUP BY Ocenka.id_student ) ;. SQL.Add ( HAVING AVG (Ocenka.Ocenka)=5 ) ;. Parameters.ParamByName ( ff ).Value:=DateToStr ( DateTimePicker3.Date);.Parameters.ParamByName(laquo;llraquo;).Value:=DateToStr(DateTimePicker4.Date);.Open;ADOQuery2.RecordCountgt;0 then:=ADOQuery2.RecordCount:=0; .Close; .SQL.Clear; .SQL.Add ( Select AVG (Ocenka.Ocenka), Ocenka.id_student ) ;. SQL.Add ( From Ocenka INNER JOIN Student ON Ocenka.id_student=Student.id_student ) ;. SQL.Add ( WHERE ((Id_gruppi= + IntToStr (DBLookupComboBox1.KeyValue) + ) AND (Data BETWEEN: ff AND: ll)) ) ;. SQL.Add ( GROUP BY Ocenka.id_student ) ;. Parameters.ParamByName ( ff ). Value:=DateToStr ( DateTimePicker3.Date);.Parameters.ParamByName(laquo;llraquo;).Value:=DateToStr(DateTimePicker4.Date);.Open;ADOQuery2.RecordCountgt;0 then:=ADOQuery2.RecordCount:=0;:=(p*100);:=(ch*100);:=(tr*100);:=(dva*100);.Variables[laquo;predraquo;]:=QuotedStr(laquo;Успеваемость студентів групи raquo;+DBLookupComboBox1.Text);.Variables[laquo;pyatraquo;]:=FloatToStr(ot);.Variables[laquo;chetraquo;]:=FloatToStr(xo);.Variables[laquo;triraquo;]:=FloatToStr(ud);.Variables[laquo;dvaraquo;]:=FloatToStr(pl);.PrepareReport;.ShowPreparedReport;;TForm10.Button4Click(Sender: TObject) ;, ch, tr, dva, vsego: integer;, xo, ud, pl: real; .Close; .SQL.Clear; .SQL.Add ( Select AVG (Ocenka), Ocenka.id_student );.SQL.Add ( From Ocenka ) ;. SQL.Add ( WHERE Data BETWEEN: ff AND: ll ) ;. SQL.Add ( GROUP BY id_student ) ;. SQL.Add ( HAVING AVG (Ocenka)=2 ) ;. Parameters.ParamByName ( ff ). Value:=DateToStr ( DateTimePicker5.Date);.Parameters.ParamByName(laquo;llraquo;).Value:=DateToStr(DateTimePicker6.Date);2.Open;
if ADOQuery2.RecordCount gt; 0 then:=ADOQuery2.RecordCount:=0; .Close; .SQL.Clear; .SQL.Add ( Select AVG (Ocenka), Ocenka.id_student ) ; .SQL.Add ( From Ocenka ) ;. SQL.Add ( WHERE Data BETWEEN: ff AND: ll ) ;. SQL.Add ( GROUP BY id_student ) ;. SQL.Add ( laquo ; HA...