func_report_incoming_detail(int,varchar(33))
sql = "select func_report_incoming_detail({},{})".format(location_id or 'null', '2020-01-01' or 'all')