I need a distinct select statement that is distinct on ORI and displays just one agency. I need one disinct ori and then displays agency. Agency might have 3 different agencies tied to ORI CA900000. I only want to display one of the agencies. It does not mater which one. Example data.
ORI Agency
CA900000 Department of Health
SELECT DISTINCT ORI, agency
FROM CP_USER
WHERE (COUNTY = 'alameda')
ORI Agency
CA900000 Department of Health
SELECT DISTINCT ORI, agency
FROM CP_USER
WHERE (COUNTY = 'alameda')