• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學習啦>學習英語>專業英語>計算機英語>

    在mysql數據庫中 rank的用法

    時間: 長思709 分享

      在mysql數據庫中 rank的用法的用法你知道嗎?下面小編就跟你們詳細介紹下在mysql數據庫中 rank的用法的用法,希望對你們有用。

      在mysql數據庫中 rank的用法的用法如下:

      Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking number should be the next consecutive integer value. In other words, there should be no "holes" between ranks.

      ?

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      +----+-------+

      | Id | Score |

      +----+-------+

      | 1 | 3.50 |

      | 2 | 3.65 |

      | 3 | 4.00 |

      | 4 | 3.85 |

      | 5 | 4.00 |

      | 6 | 3.65 |

      +----+-------+

      For example, given the above Scores table, your query should generate the following report (order by highest score):

      ?

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      +-------+------+

      | Score | Rank |

      +-------+------+

      | 4.00 | 1 |

      | 4.00 | 1 |

      | 3.85 | 2 |

      | 3.65 | 3 |

      | 3.65 | 3 |

      | 3.50 | 4 |

      +-------+------+

      題目解答:

      ?

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      # Write your MySQL query statement below

      SELECT Scores.Score, COUNT(Ranking.Score) AS RANK

      FROM Scores

      , (

      SELECT DISTINCT Score

      FROM Scores

      ) Ranking

      WHERE Scores.Score <= Ranking.Score

      GROUP BY Scores.Id, Scores.Score

      ORDER BY Scores.Score DESC;

    在mysql數據庫中 rank的用法

    在mysql數據庫中 rank的用法的用法你知道嗎?下面小編就跟你們詳細介紹下在mysql數據庫中 rank的用法的用法,希望對你們有用。 在mysql數據庫中 rank的用法的用法如下: Write a SQL query to rank scores. If there is a tie between t
    推薦度:
    點擊下載文檔文檔為doc格式
    543276 主站蜘蛛池模板: 国产大秀视频一区二区三区| 国产午夜在线观看| 99精品视频在线观看免费| 无码国产福利av私拍| 亚洲A∨无码一区二区三区| 毛片视频在线免费观看| 六月婷婷综合激情| 蜜桃成熟时33d在线| 国产日韩精品欧美一区喷水| 91制片厂在线播放| 天天av天天翘天天综合网| 中文乱码字字幕在线第5页| 日本道色综合久久影院| 亚洲av综合色区无码一区爱av | 国产精品毛片一区二区三区| s级爆乳玩具酱国产vip皮裤| 成年免费a级毛片免费看无码| 久久国产综合精品swag蓝导航| 欧美yw精品日本国产精品| 亚洲欧美成人完整版在线| 男女下面一进一出无遮挡se| 台湾swag在线观看| 西西人体444rt高清大胆| 国产成人无码av在线播放不卡| 青青草原在线视频| 国产麻豆天美果冻无码视频 | 亚洲国产成人va在线观看| 国产高清在线精品二区| av天堂永久资源网| 好男人资源在线手机免费| 中文字幕一区二区三区人妻少妇| 日本电影100禁| 久久精品道一区二区三区| 杨玉环三级dvd| 亚洲中文精品久久久久久不卡| 欧美日韩国产一区二区三区欧| 亚洲精品欧美精品日韩精品| 狠狠色综合TV久久久久久| 免费在线观看a级毛片| 粗大的内捧猛烈进出小视频| 六月丁香婷婷天天在线|