Saved Question not showing up for New Question

I am trying to build a new question off a question I made a couple days ago, but that question is not appearing in the “Select a Table” dropdown when I start a New Question. It seems like all (or at least most) other questions are there, and this question appears in the Question list. I have successfully made new questions from Saved Questions before. I am wondering what is going on and how I can get this question to appear in the dropdown.

It’s possible that your question might not be showing up due to one of the limitations to nested queries that were previously undocumented. Can you take a look at that list and see if that might be the case? Thanks.

That was it! I had named some of my columns “month_1”, “month_1”, etc. I guess these were deemed too similar, and so the table would not show up. Changing them to “month1”, “month2”, etc did the trick. Any clue why this is a rule?

I don’t think it’s a “rule,” per se, but more a current limitation of how the code was implemented. @camsaul can correct me. :slight_smile:

For your first query, they actually both come back from the database as month. We change them to month and month_2 when we display them.

You can’t use queries that have identical column names as nested queries because they’re ambiguous — SELECT month FROM <nested-query> doesn’t work because the DB doesn’t know which month you want. But giving them names that aren’t identical fixes the issue.

@maz maybe we should clarify the docs a little further?

This is interesting. My query used several ‘case when’ commands which I explicitly named “month_1”, “month_2”, “month_3”, all the way up to “month_12.” So they were given non-identical names. But with the columns named this way, I could not base a new question off of this query. I had to rename them to “month1”, “month2”, etc. Still non-identical, I just got rid of the underscore.

When it sees a column that ends in _2 it’s assuming it’s because we added the _2 ourselves because it was a duplicate column name which is why it doesn’t show up. It’s not currently smart enough to tell that you did it yourself

Ah, got it. Thanks!