Create : Make a function that uses the sql associated with the category