is there any way to convert the below function SQL function?
CREATE OR REPLACE FUNCTION public.get_hist_data ( start_time_f bigint, end_time_f bigint, tagpath_f t