1、首页数据库中新建一个表:用来记录什么学校在什么时间被浏览了。
SELECT sname From TbSchooldate as a where convert(char(10),clickdate,126) = convert(char(10),getdate(),126) group by a.sname order by count(a.sname) DESC
//查询今天所有点击的学校。通过循环列出排名
SELECT sname From TbSchooldate as a where datediff(week,clickdate,getdate())=1 group by a.sname order by count(a.sname) DESC
//查询昨天所有点击的学校。通过循环列出
//然后通过比较获得该学校上升还是下降了几位