need answer

  • 0

    Re: [I'm not sure how to debug the mysql editor](so I can't get closer to a solution)

    my code is like this, but still not right

    set @a = (select count(distinct sender_id, send_to_id) from friend_request);
    set @b = (select count(distinct requester_id, accepter_id) from request_accepted);

    delimiter $$
    create function func(rn INT, an INT) returns float(10,2)
    declare re float(10,2);
    if (rn = 0) then
    set re = 0;
    set re = rn / an;
    end if;
    return (re);

    delimiter ;
    select func(@a, @b) as accept_rate

  • 0

    The function is not supported at this moment, so please try to accomplish it using a SELECT query instead.

  • 0
    This post is deleted!

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.