• <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查找人员条目的狗最多

        时间:2023-11-28
        • <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查找人员条目的狗最多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:查找 SQL 中引用的列名和表名 下一篇:使用 sql/plsql,你如何找出文本使用的字符集?

                  相关文章

                    <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>

                    1. <small id='2DQbf'></small><noframes id='2DQbf'>