What is the datatype for that first column of information? It looks like a year and month but perhaps it is stored as a number rather than text?
You might try casting that field to a varchar(6) in both query1 and query2, then set the aggregation proper...
You might try casting that field to a varchar(6) in both query1 and query2, then set the aggregation proper...