⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group_by_department.asp

📁 一套在线考试系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>在线考试系统 — 统计表</title>
<style>
<!--
td           { font-size: 10pt }
-->
</style>
</head>

<body>

<table border="0" width="100%" height="30">
  <tr>
    <td width="100%" align="center"><b>考试成绩<%=request("str")%>统计表</b></td>
  </tr>
  <tr>
    <td width="100%" align="center">
      <p align="right">考试编号:<%=request("examid")%></td>
  </tr>
</table>
<table border="1" width="100%" style="border-collapse: collapse;" cellpadding="2" cellspacing="0" bordercolor="#000000">
  <tr>
    <td width="20%" align="center"> </td>
    <td width="20%" align="center"><b>最高分</b></td>
    <td width="20%" align="center"><b>最低分</b></td>
    <td width="20%" align="center"><b>平均分</b></td>
    <td width="20%" align="center"><b>人数</b></td>
  </tr>
<%
sql="select department,max(score) as maxper,min(score) as minper,avg(score) as avgper,count(*) as countper from view_score where examid='" & request("examid") & "' group by department"
rs.open sql,conn,3,1
do while not rs.eof
%>
  <tr>
    <td width="20%" align="center"><b><%=rs("department")%> </b></td>
    <td width="20%" align="center"><%=rs("maxper")%> </td>
    <td width="20%" align="center"><%=rs("minper")%> </td>
    <td width="20%" align="center"><%=rs("avgper")%> </td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.movenext
loop
%>
</table>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -