mysql> select @starttime:='2007-08-22 11:00'; select @endtime:='2007-08-23 11:00'; select @i_count:=count(ExamID) from MPPS where MatchTime >@starttime and MatchTime <@endtime; select @i_max:=max(ExamID) from MPPS where MatchTime >@starttime and MatchTime <@endtime; select @i_min:=min(ExamID) from MPPS where MatchTime >@starttime and MatchTime <@endtime; select @ii_count:=count(ExamID) from ExamInfo where ExamID > @i_min and ExamID < @i_max; select CONCAT(@i_count/@ii_count*100,'%') as "auto match rate" ; |
欢迎光临 MariaDB社区 (http://123.56.88.72/) | Powered by Discuz! X3.2 |