您的位置:自考365 > 复习指导 > 笔记串讲 > 工学 > 北大“数据库原理”上机实践题目总结(6)

北大“数据库原理”上机实践题目总结(6)

2007-07-18 14:42   【 】【我要纠错

  答案:2_1

  set talk off

  clear

  use teacher

  list off

  ?

  use teacher

  average age for sex =“女” to 22

  ?“女教师的平均年龄:”

  ??22

  ??“岁”

  答案:2_2

  set talk off

  clear

  use c2

  index on cxi to 11

  total on cxi to 12 fields ctimes

  use 12

  list fields ctimes,cxi for cxi=“物理” off

  ?

  use cc

  index on cname to 14

  total on cname to 15 fields sum

  use 15

  note list fields sum ,cxi off

  note?

  sum sum to a

  ?“课程总数:”

  ??str(a)

  ??“门”

  答案:2_3

  set talk off

  clear

  select teacher.tno,c2.cname,c2.ctimes,sum(c2.ctimes);

  from teacher,c2,tc;

  where teacher.tno=tc.tno and c2.cno=tc.cno and teacher.tno='1000';

  group by c2.ctimes

  答案:2_4

  set talk off

  select teacher.tno,teacher.tname,avg(tc.grade);

  from teacher,tc;

  where teacher.tno=tc.tno ;

  group by teacher.tno;

  order by tc.grade

  set talk off

  close all

  return

本文转载链接:北大“数据库原理”上机实践题目总结(6)

分享到:
  • 站内搜索
  • 课程搜索
  • 试题搜索

热门搜索:教材 报名 查分 免考 考试计划