1
I have a table where the fields are:
- cod_patient
- cod_pathology
- leading
a patient may have more than one pathology, but one must be defined as principal, need to filter which patients have no items defined as principal.
I tried the following, unsuccessfully.
select cod_cli,
count(CASE
WHEN principal IS NOT NULL THEN 1
ELSE 0
END) AS cont_principal
from cid_cli group by cod_cli
can suggest something to me?
Thanks, it worked out!
– Victor M.