Trend chart building is not working

I'm using Metabase v0.46.4 to create a trend chart. I have a table named Oven, whose DB name is Oven.db is stored in SQLite. I'm building a trend chart of items out of stock using an SQL query. The product is out of stock when the availability column value is zero.

The following is my sql query:

SELECT DATE(crawled_date) AS stock_date, COUNT(*) AS stock_count
FROM oven
WHERE availability = 0
GROUP BY stock_date
ORDER BY stock_date;

The SQL produces the correct output, but when I am trying to use the trend chart, it says ""Group by a time field to see how this has changed over time."

The schema is below

(0, 'Unnamed: 0', 'INTEGER,' 0, None, 0) (1, 'crawled_date', 'datetime', 0, None, 0) (2, 'product_url', 'TEXT', 0, None, 0) (3, 'product_name', 'TEXT', 0, None, 0) (4, 'brand', 'TEXT', 0, None, 0) (5, 'mrp', 'REAL', 0, None, 0) (6, 'sale_price', 'INTEGER', 0, None, 0) (7, 'discount_percentage', 'TEXT', 0, None, 0) (8, 'star_rating', 'TEXT', 0, None, 0) (9, 'no_of_reviews', 'REAL', 0, None, 0) (10, 'general_information', 'TEXT', 0, None, 0) (11, 'warranty', 'TEXT', 0, None, 0) (12, 'installation_demo_information', 'TEXT', 0, None, 0) (13, 'performance_features_information', 'TEXT', 0, None, 0) (14, 'cooking_features_information', 'TEXT', 0, None, 0) (15, 'power_features_information', 'TEXT', 0, None, 0) (16, 'dimensions_information', 'TEXT', 0, None, 0) (17, 'availability', 'INTEGER', 0, None, 0)

How can i fix this problem?

Did you try to cast that column to date ... I believe DATE in SQLite gives you a string output