duplicate removal - How to SQL Query records from Multiple that Equal 0? -


i have table has multiple duplicate records in first column (id records), has varying numerical data in second column.

i want able identify id records have 0 of numerical records.

for example table can like:

id value  1  2  1  2  1  0  2  0  2  0    2  0 

i want identify id 2 because values equal 0. don't want id 1 because there values > 0

sorry if isn't formatted or confusing.

select distinct id table  id not in (select distinct id table value <> 0) 

this take id in table there not row value non-zero.


Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -