I have 2 tables in Redshift as follows:
Redshift
T1: QID EID Q1 a.1,a.2 Q2 a.5,a.4,a.8 Q3 a.7 Q4 a.3,a.5
and