Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张桌子,有两列 [item,booking] 。值是
item booking Cont1 bkg1 cont2 bkg1 cont3 bkg1 cont4 bkg2 cont5 bkg3
我需要一个结果应该如下所示:
item booking cont1 bkg1
我有一个条件,例如“一个包含多个项目的有效预订”意味着显示结果。感谢您提供宝贵的结果。
select min(item), booking from your table group by booking having count(distinct item) > 1;