imagine a table that looks like this
CUST FLAG1 FLAG2
---------------------
1234 1 0
1234 1 1
1234 1 0
1234 0 1
5678 1 0
5678 1 0
9012 0 1
What I want to do is group by the cust field and combine the flags (which are boolean in nature) so I would get the following result
CUST FLAG1 FLAG2
---------------------
1234 1 1
5678 1 0
9012 0 1
Can anyone help me with this?
Assuming that “combine the flags” means “OR the flags together” so that if any row has a 1 the end result has a 1, just do a
GROUP BYwith aMAX