I have a table: abc_test with columns n_num, k_str.
This query doesnt work:
select distinct(n_num) from abc_test order by(k_str)
B
When I got same error, I got it resolved by changing it as
SELECT n_num FROM( SELECT DISTINCT(n_num) AS n_num, k_str FROM abc_test ) as tbl ORDER BY tbl.k_str