MySQL 5.6 – DENSE_RANK like functionality without Order By
For MySQL version < 8.0 (OP’s version is 5.6): The problem statement looks like needing DENSE_RANK functionality over groupVarian; however it is not. As explained by @Gordon Linoff: You appear to want them enumerated by the order they appear in the data. Assuming that your table name is t (please change the table and field … Read more