Hi all, this is embarrassing but as someone who doesn’t use much (if any) sql in my day to day work, I thought to would be a good idea to brush up on my sql using excercism.
I was doing Bottle Song in SQLite on Exercism and with my smooth brain the only way I could think of doing this is by doing this brute-force by literally inserting all statements into the table. I did look up something and it turns out sqllite does have some RECURSIVE statement. Would this be the recommended way to avoid repetitive statements?
Also, my discord invite wasn’t working from the excercism page.
If you solved the exercise, you might ask a mentor for improvement suggestions like this. Submit your code after all tests passed and request mentoring on the exercise page.
Also you get access to the community solutions, when you submitted your solution. These usually provide many interesting ways to solve the problem.
I’m sorry I can’t answer your question about SQLite’s RECURSIVE statement, as I do not know enough SQLite for that.
Hi there, I was just about to ask about this exercise myself… I did find the WITH RECURSIVE statement in the documentation, but I’m not exactly sure how to apply it here (I’ve only worked with relatively simple SQL commands so far).
Does anyone want to share some pointers? I was going to ask some help from AI but I thought it’d be better to discuss this in public, given how there’s only two posts on SQL over here.