I'm trying to pull counts from a survey customers answer over the phone. The survey has 3 questions and the answers are sometimes numeric and sometimes words. I want to count the answers but need the any numeric values to be counted and displayed as NUMERIC_ENTRY. I've been trying 'IsNumeric' and 'Case when' but can't the results correct.
Sample Data:
Question | Answer
Q1 | 12
Q1 | 456
Q1 | 8
Q1 | DontKnow
Q1 | TellMeHow
Q2 | Yes
Q3 | No
Sample Result:
Question | Asnwer | Count
Q1 | NUMERIC_ENTRY | 3
Q1 | DontKnow | 1
Q1 | TellMeHow | 1
Q2 | Yes | 1
Q3 | No | 1
The Example SQL:
select Question, Answer, count (*) from Survey
where Client = 'ABC_Company'
group by Question, Answer