Postgresql – Can someone help me resolve an sql syntax error on pgadmin while creating a function?
First Attempt - CREATE FUNCTION rental_quarter (rental_date TIMESTAMP) RETURNS VARCHAR(7) BEGIN IF MONTH(rental_date) BETWEEN 1 AND 3 THEN RETURN YEAR(rental_date)+ ”Q1”; ELSE IF MONTH(rental_date) BETWEEN 4 AND 6 THEN RETURN YEAR(rental_date)+ ”Q2” ; ELSE IF MONTH(rental_date) BETWEEN 7 AND 9…