I am selecting ColA and ColB in the same statement:
select distinct ColA, ColB, EDITABLE from TableA;
I would like to use ORDER BY lower(ColA)
, because I would like to sort ColA alphabetically, without taking capitalization into consideration. ColB does not need to be affect in this sorting and I would like to only sort ColA (which needs to be distinct because there are many instances of the same value in ColA).
I tried
select distinct ColA, ColB, EDITABLE
from TableA
ORDER BY lower(ColA)
and also saw this question concerning distinct and order by but when I tried
select distinct ColA, ColB, lower(ColA), EDITABLE
from TableA
GROUP BY ColA
ORDER BY lower(ColA) ASC, ColA
I was unable to run the statement above. I am very new at SQL and would love some tips on why this didn't work and help on what I can improve this statement on