SQL语句的使用

SELECT b.level, a.cnt FROM  (SELECT `level`,COUNT(*) AS cnt FROM wlsjlog GROUP BY level) a LEFT JOIN  `levelName` b ON a.level = b.id;
SELECT `behavirourType`,COUNT(*) AS cnt FROM wlsjlog GROUP BY behavirourType;
SELECT b.objectname, a.cnt FROM  (SELECT `object`,COUNT(*) AS cnt FROM wlsjlog GROUP BY object) a LEFT JOIN  `wlsjobject` b ON a.object = b.id;
 
 
SELECT b.level, a.cnt FROM  () a LEFT JOIN  `levelName` b ON a.level = b.id;
 
SELECT * FROM wlsjlog WHERE level = '0'
 
 
SELECT * from LEVELNAME;
SELECT `level`, COUNT(*) FROM wlsjlog GROUP BY behavirourType
 
SELECT `level`, COUNT(*) FROM wlsjlog GROUP BY behavirourType

posted @ 2016-11-15 19:05  ComeComeGo  阅读(99)  评论(0编辑  收藏  举报