日期:2014-05-17 浏览次数:21051 次
select A =
(select COUNT(*)from Activity where CrtUserID = 178864 and State = 0) *
(select CKey1 from Category where CategoryID = 1004) +
((select COUNT(*) from ActivityCmt where CrtUserID = 178864 and State = 0) + (select COUNT(*) from TopicCmt where CrtUserID = 178864 and State = 0) +(select COUNT(*) from PhotoCmt where CrtUserID = 178864 and State = 0)) *
(select CKey1 from Category where CategoryID = 1006) +
((select COUNT(*) from ActivityPhotos where CrtUserID = 178864 and State = 0) + (select COUNT(*) from Photos where CrtUserID = 178864 and State = 0)) *
(select CKey1 from Category where CategoryID = 1015) +
(select COUNT(*) from Topic where CrtUserID = 178864 and State = 0) *
(select CKey1 from Category where CategoryID = 1001) +
(select COUNT(*)from Tweet where CrtUserID = 178864 and State = 0) *
(select CKey1 from Category where CategoryID = 1002)