已知字符串 s= '''Whether the weather be fine, or whether the weather be not. Whether the weather be cold, or whether the weather be hot. We will weather the weather whether we like it or not.''' 存放了一个英文绕口令。 试编写程序,统计该字符串中英文单词的个数(不区分大小写,并且不能重复计算。)
使用派生一的一般形式如下: FROM (SELECT 列名1,列名2…… FROM 表* WHERE ...) AS 虚表*(列名1,列名2……)
C.
找出每个学生超过他自己选修课平均成绩的课程号,可用如下SQL实现: select sno, cno from sc, (select sno, avg(grade) from sc group by sno) as avg_sc(sno, grade) where sc.sno=avg_sc.sno and sc.grade>=avg_sc.agrade