文章詳情頁
sql語句 - mysql中關(guān)聯(lián)表查詢問題
瀏覽:161日期:2022-06-20 15:52:47
問題描述
問題解答
回答1:select a.*,count(b.user_id) as stars from a,b where a.user_id = b.user_id group by user_id order by stars desc;
回答2:你這個(gè)用來獲取用戶列表是沒問題的,我是要獲取特定用戶的排名。也就是怎么實(shí)現(xiàn)中間哪個(gè)select count功能。
相關(guān)文章:
1. html5 - 有可以一次性把所有 css外部樣式轉(zhuǎn)為html標(biāo)簽內(nèi)style=" "的方法嗎?2. javascript - 求解答:實(shí)例對象調(diào)用constructor,此時(shí)constructor內(nèi)的this的指向?3. javascript - 如何將一個(gè)div始終固定在某個(gè)位置;無論屏幕和分辨率怎么變化;div位置始終不變4. javascript - 這不是對象字面量函數(shù)嗎?為什么要new初始化?5. javascript - vscode alt+shift+f 格式化js代碼,通不過eslint的代碼風(fēng)格檢查怎么辦。。。6. html - vue項(xiàng)目中用到了elementUI問題7. javascript - 有什么比較好的網(wǎng)頁版shell前端組件?8. javascript - iframe 為什么加載網(wǎng)頁的時(shí)候滾動條這樣顯示?9. javascript - [js]為什么畫布里不出現(xiàn)圖片呢?在線等10. javascript - 原生canvas中如何獲取到觸摸事件的canvas內(nèi)坐標(biāo)?
排行榜

熱門標(biāo)簽