this is the first time i write. this is the example that i am use it but i have error
CREATE PROCEDURE `kfupm`.`procedure1` ()
select fname, lname, count(horseid) horses
from Owner, Owns
where Owner.ownerId = Owns.ownerId
group by Owns.ownerId
having count(horseId) > 2
how can i solve the error ?