Dear all,
building my application, I'm in trouble with a particular selection in one of MyExpress SQL DB.
In particular I have a table made like below:

id | Code | Description | .... | T1 | T2 | .... |
1 AO234 XYZ a b
2 AB567 ABC b c
3 AO234 GFH a
4 FR456 JKL b b

Basically I need to perform a selection-count on the basis of the Code column to retrieve the following data table:

(example assuming to made the selection of Code AO234)

T | #
a 2
b 1

So far I have been able to make the selection on column T1 or T2, but I cannot make the join of the two.

Do you have any suggestion I could follow?

Thanks,
A.