关于SQL中distinct 和 group by混用问题


col1 col2 col3
1 1 2
2 1 2
3 1 3
4 2 2


select col2,count(distinct col3) from table TAB group by col2;




select count (*) as cnt, col2 from table group by col2, col3

Csdn user default icon
Sql语句distinct与order by同时使用的问题

distinct与order by同时使用的时候,排序的字段必须出现在查询列中,可是为什么我没这么做还是查询成功了呢. ![图片说明](https://img-ask.csdn.net/upload/201709/05/1504581202_755865.png) 然而同样的表结构放到另外一个数据库里就很正常的提示语法错误. 是与数据库版本有关系么,使用错误的语法查询成功的是mysql 5.5,正常报错的是mysql 5.777

关于SQLdistinct和order by的问题

想实现以下功能![将数据进行去重、排列、映射、wm_concat、和替换逗号](https://img-ask.csdn.net/upload/201805/14/1526298924_197850.png) 目前SQL如下 create table test0514 ( name varchar2(500), score varchar2(500) ) insert into test0514 values('张三'); insert into test0514 values('张三'); insert into test0514 values('张三'); insert into test0514 values('张三'); insert into test0514 values('李四'); insert into test0514 values('王五'); insert into test0514 values('赵六'); insert into test0514 values('戴七'); insert into test0514 values('鬼八'); select replace(wm_concat(distinct decode(name,'张三','钢铁侠','李四','美国队长','王五','绿巨人','赵六','蜘蛛侠','戴七','黑寡妇','鬼八','猩红女巫','老十','sb')),',','+') from test0514 order by rownum 无法实现排序功能,请教各位大神如何实现!!在线等!!!


<div class="post-text" itemprop="text"> <p>below is the table i have created, my goal is to remove the duplicate results then add the value up. </p> <pre><code>| username | value | Bobby | 5 | Bobby | 5 | Bobby | 7 </code></pre> <p>This is the result I am looking for</p> <pre><code>| username | value | Bobby | 12 </code></pre> <p>How can I achieve this?</p> </div>

oracle distinct、group by、union all叠加使用报错

分组聚合条件下,计算xjh不重复的记录条数以及所有记录条数: with a as( select '2012' xn,'a'xxdm,'x1' xjh from dual union all select '2012' xn,'a'xxdm,'x1' xjh from dual union all select '2012' xn,'a'xxdm,'x2' xjh from dual union all select '2012' xn,'a'xxdm,'x3' xjh from dual ) select xn,xxdm,count(distinct xjh)rs from a group by xn,xxdm union all select xn,xxdm,count( xjh)rs from a group by xn,xxdm 在oracle 中执行报错:ora-03113 :通信通道的文件结尾 但删除union all 之后的语句,可正常显示,或删除count()中的distinct 也可执行 求大神指教。 ![图片说明](https://img-ask.csdn.net/upload/201603/31/1459421184_196379.png)

关于mysql中order by与group by的问题

select * from (select * from t2 order by gid,col2 desc) as t group by gid 这条sql语句执行完之后,为什么gid的排序是增序的???


<div class="post-text" itemprop="text"> <p>I have found a few answers on here which I have followed, found it working locally so I pushed up to our test-box where I'm finding this specific DB queries lasts over 1300 seconds by going in to mysql and <code>SHOW PROCESSLIST;</code> and it's hanging on <code>copying to tmp table</code></p> <p>It's Laravel 4.2, pretty old legacy code which I'm just trying to stabalise whilst working on a later version. This code below repeats roughly every 30 seconds as per the api_call, which is all well and good except it's not finishing and receiving a <code>504 Gateway Time-out</code> I feel like I'm doing something recursive or would scouring a really large database be an issue here?</p> <p>All I’m trying to do is run a groupBy but instead of grouping by the first one I want to group by the last one, just in case of other details being updated.</p> <p>Any help provided would be highly appreciated.</p> <pre><code>public function api_prevnames() { if (Auth::user()-&gt;repeat_vistor == 'Y') { $names = DB::table('visitors') -&gt;select(DB::raw('first_name,last_name,email,car_reg,OPTIN,vistor_company')) -&gt;where('user_id', Auth::user()-&gt;id) -&gt;where('hidden', 0) -&gt;where('email', '&lt;&gt;', '') -&gt;whereRaw('id IN (select MAX(id) FROM visitors GROUP BY first_name, last_name, email)') -&gt;get(); } return JSONResponseGenerator::successResponse($names-&gt;toArray()); } </code></pre> <p>Which generates this query</p> <pre><code>select first_name,last_name,email,car_reg,OPTIN,vistor_company from `visitors` where `user_id` = '439' and `hidden` = '0' and `email` &lt;&gt; '' and id IN (select MAX(id) FROM visitors GROUP BY first_name, last_name, email) </code></pre> <p>The previous code runs in just under a couple seconds which I've added below:</p> <pre><code> $names = DB::table('visitors') -&gt;select(DB::raw('first_name,last_name,email,car_reg,OPTIN,vistor_company')) -&gt;where('user_id', Auth::user()-&gt;id) -&gt;where('hidden', 0) -&gt;where('email', '&lt;&gt;', '') -&gt;groupBy('first_name', 'last_name', 'email') -&gt;get(); </code></pre> </div>

impala对百万级数据group by速度问题?

请问以下impala查询该如何优化,查询速度有点慢(5s以上) impala查询语句: select case when t.nl>=18 and t.nl<=25 then '18-25岁' when t.nl>=26 and t.nl<=32 then '26-32岁' when t.nl>=33 and t.nl<=40 then '33-40岁' when t.nl>=41 and t.nl<=48 then '41-49岁' when t.nl>=49 and t.nl<=55 then '49-55岁' end as nld,count(1) jls from (select case when length(sfzh)=18 then cast(from_unixtime(unix_timestamp(xxrq,'yyyy-MM-dd'),'yyyy') as int)-cast(substr(sfzh,7,4) as int) else cast(from_unixtime(unix_timestamp(xxrq,'yyyy-MM-dd'),'yyyy') as int)-cast(concat('19',substr(sfzh,7,2)) as int) end as nl,xxrq,sfzh from hbase_impala.impala_table39119_1550771711308 where sfzh is not null and year(now())-year(xxrq) <=4 ) t where t.nl>=18 and t.nl<=55 group by nld order by nld; explain结果:![图片说明](https://img-ask.csdn.net/upload/201902/22/1550800918_484083.png)

SQL请教,关于 group by

我跑下面这段代码的时候,出现这样的提示: ![图片说明](https://img-ask.csdn.net/upload/201502/03/1422968729_260342.jpg) 请问哪里出问题了? ``` drop table if exists fz_yn3; create table fz_yn3 as select z.user_id,z.nick,z.appkey,z.company,z.plan,b.cust_id,b.shop_cat_name,b.gmt_create,b.seller_star_name,b.shop_start from fz_yn2 z left outer join (select distinct cust_id,nick_name,shop_cat_name,gmt_create,seller_star_name,shop_start from ad_p4p_dw.dim_p4p_customer_extra where ds=20141031) b on z.nick=b.nick_name group by z.user_id,z.nick,z.appkey,z.company,z.plan; ```


<div class="post-text" itemprop="text"> <p>I have a field in a table named startdate and what I would like to do is run as little queries as possible to obtain a list that would display as the following:</p> <pre><code>2012 January March October 2011 September November </code></pre> <p>The only dates that I want to show per year are the dates where there is a record for. </p> <p>Any help or pointers appreciated. </p> <p>Thanks</p> </div>

关于SQL子查询中使用order by的问题

最近回头看以前的数据库教材《数据库系统概论》人大 王珊 版的 有一段叙述:“需要特别指出的是,子查询的select语句不能使用 order by子句,order by子句只能对最终查询结果排序” 但是正好之前练习碰到个场景,就在子句中用了order by ,结果也是正确的。 所以我很疑惑,是书上说错了还是什么原因 下面是SQL [code="java"]select userid from (select userid,min(createtime) from LT_BIZORDER t where (t.status in (1,2,3,4,5) or (t.status=6 and t.endstatus in (0,1,2))) and createtime > to_date('2014-06-01','yyyy/MM/dd') group by t.userid order by min(createtime) asc) where rownum<=10000[/code]

如何通过 SQL 中的另一列来选择具有 MAX (Column value)和 DISTINCT 的行?

<div class="post-text" itemprop="text"> <p><strong>My table is:</strong> </p> <pre><code>id home datetime player resource ---|-----|------------|--------|--------- 1 | 10 | 04/03/2009 | john | 399 2 | 11 | 04/03/2009 | juliet | 244 5 | 12 | 04/03/2009 | borat | 555 3 | 10 | 03/03/2009 | john | 300 4 | 11 | 03/03/2009 | juliet | 200 6 | 12 | 03/03/2009 | borat | 500 7 | 13 | 24/12/2008 | borat | 600 8 | 13 | 01/01/2009 | borat | 700 </code></pre> <p>I need to select each distinct <code>home</code> holding the maximum value of <code>datetime</code>. </p> <p><strong>Result would be:</strong> </p> <pre><code>id home datetime player resource ---|-----|------------|--------|--------- 1 | 10 | 04/03/2009 | john | 399 2 | 11 | 04/03/2009 | juliet | 244 5 | 12 | 04/03/2009 | borat | 555 8 | 13 | 01/01/2009 | borat | 700 </code></pre> <p><strong>I have tried:</strong></p> <pre><code>-- 1 ..by the MySQL manual: SELECT DISTINCT home, id, datetime AS dt, player, resource FROM topten t1 WHERE datetime = (SELECT MAX(t2.datetime) FROM topten t2 GROUP BY home) GROUP BY datetime ORDER BY datetime DESC </code></pre> <p>Doesn't work. Result-set has 130 rows although database holds 187. Result includes some duplicates of <code>home</code>.</p> <pre><code>-- 2 ..join SELECT s1.id, s1.home, s1.datetime, s1.player, s1.resource FROM topten s1 JOIN (SELECT id, MAX(datetime) AS dt FROM topten GROUP BY id) AS s2 ON s1.id = s2.id ORDER BY datetime </code></pre> <p>Nope. Gives all the records.</p> <pre><code>-- 3 ..something exotic: </code></pre> <p>With various results.</p> </div> <p>转载于:https://stackoverflow.com/questions/612231/how-can-i-select-rows-with-maxcolumn-value-distinct-by-another-column-in-sql</p>

sql 用子查询代替distinct


在Go中实现聚合的最佳方法(例如SQL中的GROUP BY)?

<div class="post-text" itemprop="text"> <p>Let's say I have a struct</p> <pre><code>type row struct { f1, f2, f3 string v int64 } </code></pre> <p>We can imagine it as a row in a table.</p> <p>Also, I need to implement a function which does aggregation like this query:</p> <pre><code>SELECT f1, f2, f3, SUM(v) FROM table GROUP BY f1, f2, f3 </code></pre> <p>So, I have to implement function:</p> <pre><code>type key struct { f1, f2, f3 string } func aggregate(t []row) map[key]int64 </code></pre> <p>or if can be</p> <pre><code>func aggregate(t []row) map[string]row </code></pre> <p>where map key is, for instance, f1+f2+f3</p> <pre><code>func aggregate(t []row) []row </code></pre> <p>also works if result will include unique f1, f2, f3 combinations (DISTINCT f1, f2, f3)</p> <p>I have two variants:</p> <pre><code>func aggregate1(t []row) map[key]int64 { res := map[key]int64{} for _, r := range t { res[key{r.f1, r.f2, r.f3}] += r.v } return res } func aggregate2(t []row) map[string]*row { res := map[string]*row{} for _, r := range t { var sb strings.Builder sb.WriteString(r.f1) sb.WriteString("#") sb.WriteString(r.f2) sb.WriteString("#") sb.WriteString(r.f3) id := sb.String() t := res[id] if t == nil { t = &amp;row{f1: r.f1, f2: r.f2, f3: r.f3, v: 0} res[id] = t } t.v += r.v } return res } </code></pre> <p>The first variant spends too much time in <a href="https://golang.org/pkg/runtime/?m=all#mapassign" rel="nofollow noreferrer">https://golang.org/pkg/runtime/?m=all#mapassign</a> (runtime.mapassign)</p> <p>The idea of the second variant is to use faster <a href="https://golang.org/pkg/runtime/?m=all#mapassign_faststr" rel="nofollow noreferrer">https://golang.org/pkg/runtime/?m=all#mapassign_faststr</a> (runtime.mapassign_faststr), but strings.Builder.WriteString eliminates all benefits from runtime.mapassign_faststr :(</p> <p>So, can you suggest more ideas about how to implement this aggregation?</p> <p>I am thinking about how to efficiently calculate "id" in the second variant. It should be unique. My variant is unique because f1, f2 and f3 can't include "#" character. </p> </div>

sql distinct是去重的 可是当我查询多个字段 但只想去重其中某一个字段 怎么办

sql distinct是去重的 ,当查询多个字段 distinct是为这几个字段的整体去重,可是当我查询多个字段, 但只想去重其中某一个字段, 怎么办


<div class="post-text" itemprop="text"> <p>So i'm trying to select some contacts (TABLE2) based on their HISTORY (TABLE1). So I am testing with this SQL Query:</p> <pre><code>SELECT contacts_history.userId, contacts_history.contactId, contacts_history.dateAdded, contacts.firstName FROM contacts_history INNER JOIN contacts ON contacts_history.contactId = contacts.contactId AND contacts_history.userId = contacts.userId GROUP BY contacts.contactId ORDER BY contacts_history.dateAdded DESC LIMIT 0, 10 </code></pre> <p>But i'm noticing that i'm not getting the most 'recent' values. If I remove the GROUP BY I get totally different DATE RANGES.</p> <p>I have tried using DISTINCT, but no decent response either.</p> <p>Take a look at the comparison table results.</p> <p><img src="https://i.stack.imgur.com/1zY7V.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/ZoR2f.png" alt="enter image description here"></p> <p>I'm having a hard time getting the most recent items, without having duplicate contactId's in there. </p> <p>Any help would be greatly appreciated... i'm sure this is super basic, just not sure why it's not working the best.</p> </div>

Sql union和group by

<div class="post-text" itemprop="text"> <p>I have a query:</p> <pre><code>SELECT users.name, COUNT(DISTINCT leads.id) as leads, COUNT(DISTINCT properties.id) as properties, COUNT(DISTINCT buyers.id) as buyers, null FROM users LEFT JOIN (SELECT * from leads WHERE date(created_at) BETWEEN '2019-04-13' AND'2019-04-13') leads ON users.id = leads.user_id LEFT JOIN (SELECT * from properties WHERE date(contract_start_date) BETWEEN '2019-04-13' AND'2019-04-13') as properties ON users.id = properties.user_id LEFT JOIN (SELECT * from buyers WHERE date(created_at) BETWEEN '2019-04-13' AND'2019-04-13') as buyers ON users.id = buyers.user_id LEFT JOIN buyer_searches ON buyers.id = buyer_searches.buyer_id GROUP BY users.id UNION SELECT users.name, null, null, null, COUNT(DISTINCT buyer_searches.id) as buyer_searches FROM users LEFT JOIN buyers ON users.id = buyers.user_id LEFT JOIN (SELECT * from buyer_searches WHERE date(created_at) BETWEEN '2019-04-08' AND'2019-04-13') as buyer_searches ON buyers.id = buyer_searches.buyer_id GROUP BY users.id </code></pre> <p>I get a table with duplicate users of course, but with the correct params:</p> <pre><code>users field1 field2 field3 etc.... user1 data . null . null etc... user2 data . null . null etc... user1 null . data . data etc... user2 null . data .data etc... etc... </code></pre> <p>I would like concatenate the rows by users.</p> </div>


本人数据库不熟,拜托大家了 ![图片说明](https://img-ask.csdn.net/upload/201511/27/1448613087_281704.png) 这是原始数据库里的数据 ![图片说明](https://img-ask.csdn.net/upload/201511/27/1448613109_28243.png) 这是sql运行后的效果

Php sql DISTINCT行id没有重复

<div class="post-text" itemprop="text"> <pre><code>SELECT DISTINCT buyer,caseid,subject,service FROM s_support ORDER BY id DESC </code></pre> <p>result is</p> <pre><code>buyer subject service caseid abel@gmail.com ---- I need help ---- Other ---- 438613 bani@gmail.com ---- Urgent ---- Other ---- 438612 rony@gmail.com ---- Help ---- Other ---- 438611 </code></pre> <p>I want to view <code>id</code> in DISTINCT How? I wants to hide the duplicates to keep only one row per buyer/subject/service/case but keep a row ID.</p> <pre><code>id buyer subject service caseid 9 abel@gmail.com ---- I need help ---- Other ---- 438613 7 bani@gmail.com ---- Urgent ---- Other ---- 438612 6 rony@gmail.com ---- Help ---- Other ---- 438611 </code></pre> </div>

SQL语句distinct把case when then 把相同的数据给去掉了

我SQL语句是这样的 sum(distinct case when e.ifxydw='1' and a.delstate ='0' then b.money else null end) as Xysr, 也碰到了跟上面一样的问题,b.money只要数据相同他就把我的给去掉了,这样我改怎么解决?求大神指教


今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...


华为面试整体流程大致分为笔试,性格测试,面试,综合面试,回学校等结果。笔试来说,华为的难度较中等,选择题难度和网易腾讯差不多。最后的代码题,相比下来就简单很多,一共3道题目,前2题很容易就AC,题目已经记不太清楚,不过难度确实不大。最后一题最后提交的代码过了75%的样例,一直没有发现剩下的25%可能存在什么坑。 笔试部分太久远,我就不怎么回忆了。直接将面试。 面试 如果说腾讯的面试是挥金如土...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...


loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...


刚才邻居打了个电话说:喂小灰,你家wifi的密码是多少,我怎么连不上了。 我。。。 我也忘了哎,就找到了一个好办法,分享给大家: 第一种情况:已经连接上的wifi,怎么知道密码? 打开:控制面板\网络和 Internet\网络连接 然后右击wifi连接的无线网卡,选择状态 然后像下图一样: 第二种情况:前提是我不知道啊,但是我以前知道密码。 此时可以利用dos命令了 1、利用netsh wlan...



总结了 150 余个神奇网站,你不来瞅瞅吗?



提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...




私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...


即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...


如果世界上都是这种不思进取的软件公司,那别说大部分程序员只会写 3 年代码,恐怕就没有程序员这种职业。

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...




虽然大公司并不是人人都能进,但我仍建议还未毕业的同学,尽力地通过校招向大公司挤,但凡挤进去,你这一生会容易很多。 大公司哪里好?没能进大公司怎么办?答案都在这里了,记得帮我点赞哦。 目录: 技术氛围 内部晋升与跳槽 啥也没学会,公司倒闭了? 不同的人脉圈,注定会有不同的结果 没能去大厂怎么办? 一、技术氛围 纵观整个程序员技术领域,哪个在行业有所名气的大牛,不是在大厂? 而且众所...


本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...




当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...


HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...






爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4


编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?





已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...




导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...