我的表格数据为:
{
"status" : "CREATED",
"message" : "user created",
"results" : [
{
"id" : "1243233",
}
]
}
我要删除第4,5,6行。所有行的C2 = 0,具有相同的C1和C2 = 1.建议?
答案 0 :(得分:0)
delete from your_table
where c2 = 0
and c1 in
(
select c1
from your_table
where c2 in (0,1)
group by c1
having count(distinct c2) = 2
)