Nothing returned when running SQL query in SQL tool for a single column DISTINCT or GROUP BY?
Since I'm just starting to use this aspect of IRIS I can't tell if this is a bug or some kind of nuance. If I run a single column query like this, I get results:
However if I try to retrieve using a DISTINCT or GROUP BY, I get no results:
And again except with a GROUP BY, with no results:
If I add in some other columns I still get no results HOWEVER, if I add in a date column, I now get results:
What am I missing here? Is this by design and if so, what governs whether a return set is returned or not? I did purge my query cache in case something was happening there but it did not fix this.
Can you show the query plan? Usually this issue "shows" when indices are out of sync. Maybe try rebuilding indices.
This was indeed the issue, indexes needed to be rebuilt.