T Sql Create Function Returns Table Example Of Frequency