Was working on a SQL query to generate a SQL query and there needed to be a looping element. For reasons beyond me I never considered asking ChatGPT. When I did ask it later, it gave me a decent solution which prompted me to remember recursive CTEs I must be getting old.