Hello Kirk,

Is this even possible?


It looks like if you could "un-pivot" your t2, then you could do a join between 
that result and t1 and have your desired table.  Others may be able to suggest 
a more direct solution, but I've successfully adapted the one given here, with 
my own wide-format tables:

https://cgsrv1.arrc.csiro.au/blog/2010/05/14/unpivotuncrosstab-in-postgresql/


Good luck,
Bryan

Reply via email to