--SQL查询每个表的字段数量select b.[name], count(*) As AllCount,ISNULL(ISNULL(sum(case when isnullable=0 then 1 end),null),null) as NotNullCountfrom syscolumns aINNER JOIN( select [id], [name] from [sysobjects] where [type] = 'u' ) AS b ON a.id = b.[id] GROUP b
#!bin/bash#作者:liusingbon#功能:统计 Linux 进程相关数量信息,running(运行的进程),sleeping(睡眠中的进程),stoped(停止的进程),zombie(僵尸进程)running=0sleeping=0stoped=0zombie=0#在 proc 目录下所有以数字开始的都是当前计算机正在运行的进程的进程 PID#每个PID编号的目录下记录有该进程相关的信息for pid in /proc/[1-9]*doprocs=$[procs+1]stat=$(
1.统计每分钟内 url 的访问数量 SELECT SUBSTRING(CONVERT(varchar(100), date, 20), 0,17) as dateTime,COUNT(url) as count,url,referer FROM demo GROUP BY url,(SUBSTRING(CONVERT(varchar(100), date, 20), 0,17) ),referer;
case when语句,用于计算条件列表并返回多个可能结果表达式之一.CASE 具有两种格式:1.简单 case 函数: case input_expression when when_expression then result_expression [ ...n ] [ else else_result_expression end 2.case 搜索函数: case when Boolean_expression then result_expression [ ...n ] [ esle