标签: sql
我有一个包含以下列的表
1 = monday 2 = tuesday 3 = wednesday
我需要查找一周内没有退货的所有代码。 week_num列是周数,而week_day列是:
ghcjs-0.2.0.9006030_ghc-7.10.3
依旧......
答案 0 :(得分:4)
您可以使用聚合:
select code, week_num from t group by code, week_num having max(return) = 0;