--- SQL Server statement: SELECT COUNT (1 ), remark FROM (SELECT Remark = case when Remark LIKE '% check tkt time % 'then' there is a problem WITH the retention TIME 'when Remark LIKE' % WITH "AV" AGAIN % 'then' there is no space 'When Remark LIKE 'duplicate tel number % 'then' the specified office number is repeated. 'When Remark LIKE '% invalid foid % 'then' the certificate NUMBER is incorrect. 'else' additional 'end' FROM JinRiLogger. dbo. userOperateLog201307 WITH (NOLOCK) WHERE OperateType = 8) AS a group by. remark --- oracle statement: selectcase when Remark LIKE '% check tkt time % 'then' there is a problem WITH the retention TIME 'when Remark LIKE' % WITH "AV" AGAIN % 'then' there is no space 'when Remark LIKE 'duplicate tel number % 'then' the specified office number is repeated. 'When Remark LIKE '% invalid foid % 'then' id number is incorrect. 'else' additional 'end, count (*) FROM JinRiLog. userOperateLog partition (p2) where Operatetype = 8 group byCASE WHEN Remark LIKE '% check tkt time % 'then' there is a problem WITH the retention TIME 'when Remark LIKE' % WITH "AV" AGAIN % 'then' there is no space' WHEN Remark LIKE 'duplicate tel number % 'then' the specified office number is repeated. 'When Remark LIKE '% invalid foid % 'then' the id number is incorrect. 'else' additional 'end;
This article is from "record bit by bit !" Blog, please be sure to keep this source http://ocpyang.blog.51cto.com/3401739/1300170