SQL CTE Not Returning Results

Do you get any errors when you run this in the DB Browser?

I suspect Ignition is interpreting your query as an update and not a select.

You could try this solution

The solution below suggests running runQuery which you are doing so if the No Count Off solutions doesn't work for you then you'll probably have to wrap it in a Stored Procedure as recommended below or use a View and call that.