I need to query the sql server so that it identifies to me when the 1,2 and 3 or 2 and 3 combinations of the "desc" column are present for repeated values of the "cod" column, the result should be returned as 1 for found and 0 not found. Does anyone know how this query can be done? Thank you.