Untitled
unknown
plain_text
3 years ago
184 B
17
Indexable
SELECT o.user_id,
CAST(DATE_TRUNC('month', MIN(o.created_at))AS date)
FROM tools_shop.orders AS o
JOIN tools_shop.events AS e ON o.user_id = e.user_id
GROUP BY o.user_id;
Editor is loading...