主頁 > 知識(shí)庫 > 世界杯猜想活動(dòng)的各類榜單的SQL語句小結(jié)

世界杯猜想活動(dòng)的各類榜單的SQL語句小結(jié)

熱門標(biāo)簽:臨沂智能電銷機(jī)器人加盟哪家好 鎮(zhèn)江網(wǎng)路外呼系統(tǒng)供應(yīng)商 百度地圖標(biāo)注改顏色 小e電話機(jī)器人 電銷外呼有錄音系統(tǒng)有哪些 申請(qǐng)400電話在哪辦理流程 外呼運(yùn)營商線路收費(fèi) 貴州房產(chǎn)智能外呼系統(tǒng)供應(yīng)商 一個(gè)導(dǎo)航軟件能用幾個(gè)地圖標(biāo)注點(diǎn)
/*增幅降幅排名*/
復(fù)制代碼 代碼如下:

Select top 50 UserName,sum(ReceivePrice) - sum(GuessPrice) as ReceivePrice,
cast(sum(CASE WHEN ReceivePrice>0 THEN 1.0 ELSE 0 END) / count(ReceivePrice) * 100 as numeric(4,1)) as Rate
From [game_FantasyLog]
WHERE IsJudge=1
GROUP BY UserId,UserName
ORDER BY sum(ReceivePrice) - sum(GuessPrice) ASC

/*正確率錯(cuò)誤率排名*/
復(fù)制代碼 代碼如下:

Select top 50 UserName,sum(ReceivePrice) - sum(GuessPrice) as ReceivePrice,
cast(sum(CASE WHEN ReceivePrice>0 THEN 1.0 ELSE 0 END) / count(ReceivePrice) * 100 as numeric(4,1)) as Rate
From [game_FantasyLog]
WHERE IsJudge=1
GROUP BY UserId,UserName Having count(UserId) >= 5
ORDER BY cast(sum(CASE WHEN ReceivePrice>0 THEN 1.0 ELSE 0 END) / count(ReceivePrice) * 100 as numeric(4,1)) ASC

/*大手筆排名*/
復(fù)制代碼 代碼如下:

Select top 50 l.UserName,sum(l.GuessPrice),sum(l.ReceivePrice),f.title
From [game_FantasyLog] l left join [game_fantasy] f on l.topicid = f.id
GROUP BY l.TopicId,l.UserName,f.title
ORDER BY sum(l.GuessPrice) DESC

/*冷門場次排名*/
復(fù)制代碼 代碼如下:

Select top 50 f.id,f.title,f.GuessPrice,(select sum(receivePrice) FROM [game_FantasyLog] l where l.topicid = f.id),
cast((select sum(CASE WHEN ReceivePrice>0 THEN 1.0 ELSE 0 END) / f.GuessTimes FROM [game_FantasyLog] l2 where l2.topicid = f.id) as numeric(4,2))
From [game_Fantasy] f WHERE f.GuessPrice > 1000
ORDER BY (select sum(receivePrice) FROM [game_FantasyLog] l where l.topicid = f.id) ASC

/*冷門場次的命中者*/
復(fù)制代碼 代碼如下:

Select top 50 UserName,sum(ReceivePrice) as ReceivePrice
From [game_FantasyLog] where topicid=29
GROUP BY TopicId,UserName
ORDER BY sum(ReceivePrice) DESC

標(biāo)簽:延邊 日照 三明 澳門 嘉興 保定 晉城 合肥

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《世界杯猜想活動(dòng)的各類榜單的SQL語句小結(jié)》,本文關(guān)鍵詞  世界杯,猜想,活動(dòng),的,各類,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《世界杯猜想活動(dòng)的各類榜單的SQL語句小結(jié)》相關(guān)的同類信息!
  • 本頁收集關(guān)于世界杯猜想活動(dòng)的各類榜單的SQL語句小結(jié)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章