第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

數(shù)據(jù)的顯示情況

數(shù)據(jù)的顯示情況

森欄 2018-08-02 05:06:13
數(shù)據(jù)庫(kù)顯示的頁(yè)面                                           頁(yè)面顯示的數(shù)據(jù)      說明:頁(yè)面中顯示的表頭是數(shù)據(jù)庫(kù)中表的reson列里面的所有數(shù)據(jù),是固定的,amount是數(shù)量。頁(yè)面中顯示的數(shù)據(jù)是按天數(shù)來(lái)查的,如果該天查到的reason原因中,有些reason原因不存在的話就用0表示。請(qǐng)教各位大俠們:我要做成這種形式的,在數(shù)據(jù)層和服務(wù)端中我應(yīng)該怎么操作,具體應(yīng)該怎么去寫。
查看完整描述

1 回答

?
楊魅力

TA貢獻(xiàn)1811條經(jīng)驗(yàn) 獲得超6個(gè)贊

你的第一個(gè)圖是 是數(shù)據(jù)庫(kù)的原始數(shù)據(jù)   還是你寫查詢語(yǔ)句進(jìn)行的處理過的數(shù)據(jù)  如聚合函數(shù)?

如果數(shù)據(jù)庫(kù)表的數(shù)據(jù)是這樣的話 下面的sql語(yǔ)句

select showtime,isnull(sum(unknow),0) as unknow ,isnull(sum(noidea),0) as noidea ,
isnull(sum(soso),0) as soso,isnull(sum(understand),0) as understand
 from 
(select showtime,case when reason='不明白' then Amount end unknow, 
case when reason='不清楚' then Amount end noidea,
case when reason='還好' then Amount end soso,
case when reason='了解' then Amount end understand
from test1 group by showtime,reason,Amount) as temp
group by showtime

--表test1 你可以替換為 你的查詢語(yǔ)句

查詢結(jié)果 

showtime                unknow      noidea      soso        understand
----------------------- ----------- ----------- ----------- -----------
2012-01-12 00:00:00.000 0           0           5           4
2012-02-10 00:00:00.000 3           0           0           0
2012-11-18 00:00:00.000 2           3           0           3
2012-12-21 00:00:00.000 0           1           0           0



你應(yīng)該把的表結(jié)構(gòu) 給說出來(lái) 而不是你查出來(lái)的數(shù)據(jù) 我還糾結(jié)哪有這樣建表的啊  


查看完整回答
反對(duì) 回復(fù) 2018-08-06
  • 1 回答
  • 0 關(guān)注
  • 620 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)