• <legend id='wP1QY'><style id='wP1QY'><dir id='wP1QY'><q id='wP1QY'></q></dir></style></legend>

    <small id='wP1QY'></small><noframes id='wP1QY'>

    <tfoot id='wP1QY'></tfoot>
      <bdo id='wP1QY'></bdo><ul id='wP1QY'></ul>
        <i id='wP1QY'><tr id='wP1QY'><dt id='wP1QY'><q id='wP1QY'><span id='wP1QY'><b id='wP1QY'><form id='wP1QY'><ins id='wP1QY'></ins><ul id='wP1QY'></ul><sub id='wP1QY'></sub></form><legend id='wP1QY'></legend><bdo id='wP1QY'><pre id='wP1QY'><center id='wP1QY'></center></pre></bdo></b><th id='wP1QY'></th></span></q></dt></tr></i><div id='wP1QY'><tfoot id='wP1QY'></tfoot><dl id='wP1QY'><fieldset id='wP1QY'></fieldset></dl></div>

        SQL查找人员条目的狗最多

        SQL finding person entry has the most dogs(SQL查找人员条目的狗最多)
        • <legend id='MmV0R'><style id='MmV0R'><dir id='MmV0R'><q id='MmV0R'></q></dir></style></legend>

          <small id='MmV0R'></small><noframes id='MmV0R'>

            <tbody id='MmV0R'></tbody>
            <i id='MmV0R'><tr id='MmV0R'><dt id='MmV0R'><q id='MmV0R'><span id='MmV0R'><b id='MmV0R'><form id='MmV0R'><ins id='MmV0R'></ins><ul id='MmV0R'></ul><sub id='MmV0R'></sub></form><legend id='MmV0R'></legend><bdo id='MmV0R'><pre id='MmV0R'><center id='MmV0R'></center></pre></bdo></b><th id='MmV0R'></th></span></q></dt></tr></i><div id='MmV0R'><tfoot id='MmV0R'></tfoot><dl id='MmV0R'><fieldset id='MmV0R'></fieldset></dl></div>
            <tfoot id='MmV0R'></tfoot>

                • <bdo id='MmV0R'></bdo><ul id='MmV0R'></ul>
                  本文介绍了SQL查找人员条目的狗最多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  人(身份证,狗)

                  如何找到狗最多的人

                  select *
                  from person p1
                  where p1.id in (
                      select p2.id
                      from person p2
                      where p1.id = p2.id
                      having count(dogs > (
                          select p3.id ...etc
                  

                  我是在正确的轨道上还是这行不通?谢谢观看

                  am I on the right track or will this not work? thanks for taking a look

                  推荐答案

                  这个怎么样?

                  select *
                  from person
                  where dogs = (select max(dogs) from person)
                  

                  可能不是最有效的方法,但这会给你一个(或多个)狗数量最多的人.如果你只想要其中之一,你可以这样做:

                  Probably not the most efficient way, but that will give you the person (or persons) that have the greatest dog count. If you just want one of them, you can do this:

                  select top 1 
                  from person
                  order by dogs desc
                  

                  这篇关于SQL查找人员条目的狗最多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I split flat file data and load into parent-child tables in database?(如何拆分平面文件数据并加载到数据库中的父子表中?)
                  How to import CSV into sqlite using RSqlite?(如何使用 RSqlite 将 CSV 导入 sqlite?)
                  Import CSV to Update rows in table(导入 CSV 以更新表中的行)
                  Importing MaxMind#39;s GeoLite2 to MySQL(将 MaxMind 的 GeoLite2 导入 MySQL)
                  Import / Export database with SQL Server Server Management Studio(使用 SQL Server Server Management Studio 导入/导出数据库)
                  How do you import a large MS SQL .sql file?(如何导入大型 MS SQL .sql 文件?)
                    <tbody id='2DQbf'></tbody>
                      <bdo id='2DQbf'></bdo><ul id='2DQbf'></ul>
                      <legend id='2DQbf'><style id='2DQbf'><dir id='2DQbf'><q id='2DQbf'></q></dir></style></legend>

                    • <i id='2DQbf'><tr id='2DQbf'><dt id='2DQbf'><q id='2DQbf'><span id='2DQbf'><b id='2DQbf'><form id='2DQbf'><ins id='2DQbf'></ins><ul id='2DQbf'></ul><sub id='2DQbf'></sub></form><legend id='2DQbf'></legend><bdo id='2DQbf'><pre id='2DQbf'><center id='2DQbf'></center></pre></bdo></b><th id='2DQbf'></th></span></q></dt></tr></i><div id='2DQbf'><tfoot id='2DQbf'></tfoot><dl id='2DQbf'><fieldset id='2DQbf'></fieldset></dl></div>

                        <tfoot id='2DQbf'></tfoot>

                          • <small id='2DQbf'></small><noframes id='2DQbf'>