Redshift Function Return Table