SQL query help
Hi! Dev student here, new to both Supabase and databases in general. Trying tro write a function with SQL but get the error "syntax error at or near "" ". Can't figure out what i am doing wrong.. help pls!
create or replace function get_dates(user_id_input uuid, friend_id_input uuid) returns setof record language sql as $$
SELECT date, COUNT(date)
FROM available_dates
where user_id = (user_id_input)
or user_id = (friend_id_input)
GROUP BY date
HAVING COUNT(date) > 1;
$$;