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

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

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)
                    <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'>