get columns base on two sql querys