
1 itechify PRO 。。。 |
2 execute 2020-02-18 16:18:54 +08:00 没有附加条件么? 那 :where id = 2 |
3 shyrock 2020-02-18 16:19:37 +08:00 这。。。作业?好奇 lz 咋写的 SQL |
4 speedofstephen 2020-02-18 16:21:54 +08:00 |
5 speedofstephen 2020-02-18 16:23:19 +08:00 错了 好像还得加上 where H1.cnt=2 |
6 shyrock 2020-02-18 16:24:22 +08:00 select distinct(id) from T MINUS select distinct(id) from T where name in ('C','D',...) |
7 ZPPP OP |
8 taotaodaddy 2020-02-18 17:14:11 +08:00 via Android 考虑一下 concat ?效率不知 |
9 ebony0319 2020-02-18 17:15:18 +08:00 |
10 ebony0319 2020-02-18 17:16:06 +08:00 |
12 ZPPP OP @speedofstephen 感谢,是正解。 |
13 turan12 2020-02-19 00:20:28 +08:00 请楼主独立完成作业。。。 |
14 zhuzhibin 2020-02-19 01:21:21 +08:00 via iPhone 内联取交集? |
15 alya 2020-02-19 10:28:29 +08:00 select id from t1 group by id having collect_set(name) in (array("A","B"), array("B", "A")) |