Combine two tables to create a table or view showing which coords are inside which polygons

id 1,
geometry Point(50 25),

id 1,
polygon Polygon(45 50, 40 52, 35 89, 12, 15, 1 4)

I am trying to create an output showing which will be used in powerbi

id 1
geometry Point(50 25)
PolygonsWithin 1,2,3,4,5

I have both columns set to type geometry with an additional wkt field to make it easier for myself to read without converting it each time.

How would you do this?

I think you're looking for STIntersection which you can use to show which points (coordinates) intersect a polygon. Here's a page where you can read up on it. You may have to tinker a bit...depending on the quality of the data and the coordinate system, you may have to use .MakeValid() on the points to pass validity and you may have to also experiment with geography vs geometry conversions too.

Check this ild thread