sql - How to exclude a group based on one element of another column? -


i have dataset looks this:

    claim   type     0       1     107444  2     107444  5     107445  2     107446  2 

etc...

as result of simple query:

    select claim,[type] mytbl     group claim,[type]     order claim 

i want write query excludes claims have type = 5, result of be:

    claim   type     0       1     107445  2     107446  2 

any ideas on how accomplish this?

you can logic in where clause:

select claim, [type] mytbl claim not in (select claim mytbl [type] = 5) 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -