Issue with Pivot Table

I want to create a pivot table based on SQL
So I stored the SQL and then loaded the result as the basis for the Native Question
I am having issues when the date column is stored as Date and not as text the built in buider is unable to parse the results and then it does not allow me to choose any columns. When the date is stored as text it does work, but then I can't run any filters that I need on the date.

As you see it is not recognizing any of the columns

What is the correct formate to store the dates in the SQL so that the native query will recognize it?

I tried

cast(d.date as date) AS "Date"
DATE_FORMAT(d.date, '%Y-%m-%d') AS "Date"

What version of metabase are you running and what Database is this?

DynamoDB on aws with Athena as the connector to meta.
Basic paid online version of meta

if you have a paid version of Metabase (self hosted or cloud), please contact us through support since we can allocate time to supporting you. Here in the forums there's no way in which we can know that you're a paid customer