So I tried to join three tables to create a view below.
CREATE VIEW v_employee
AS SELECT employees.employee_guid, employees.first_name, employees.email, employees.phone_number,MIN(employment_pay.effective_date) as HIRE_DATE
FROM EMPLOYEES
JOIN EMPLOYMENT
ON EMPLOYEES.EMPLOYEE_GUID = EMPLOYMENT.EMPLOYEE_GUID
JOIN EMPLOYMENT_PAY
ON EMPLOYMENT.EMPLOYMENT_GUID = EMPLOYMENT_PAY.EMPLOYMENT_GUID
;
/
However, I received this error
Error starting at line : 626 in command -
CREATE VIEW v_employee
AS SELECT employees.first_name, employees.email, employees.phone_number,MIN(employment_pay.effective_date) as HIRE_DATE
FROM EMPLOYEES
JOIN EMPLOYMENT
ON EMPLOYEES.EMPLOYEE_GUID = EMPLOYMENT.EMPLOYEE_GUID
JOIN EMPLOYMENT_PAY
ON EMPLOYMENT.EMPLOYMENT_GUID = EMPLOYMENT_PAY.EMPLOYMENT_GUID
Error report -
ORA-00937: not a single-group group function
00937. 00000 - "not a single-group group function"
*Cause:
*Action:
I wonder if anyone could advise? Here is the attached of the tables


