Dear members

I try to extract some information from two mysql tables. I agree that the tables are bit weird, I have no control over the schema. Table 1 values are the column headers for the table...