I used to like doing interviews where I had the person (collaboratively) code conways game of life in SQL.
You don’t need to recursively write it. But seeing they understand how to translate logic into table based entries, do basic DML via updates (or I had a no dml template that just used the query results), using window functions and aggregates, case when’s, etc. gave a very good overview of their understanding of sql across a lot of features.
I provided the skeleton and the rules, and I’d help them through it. The goal was that it was fun and not horribly stressful, I made it clear I’d provide any answers to questions or functions or syntax they needed (because IRL they’d just google, so I’ll save them the time).
I think most candidates had fun with it.