[sql] How can I merge the columns from two tables into one output?