I have two select statements that each produce multiple columns of data and multiple rows. Each select statement produces the same number of columns and rows. I would like to produce one select statement that combines both so I see the table columns concatenated in the query browser. So if the 1st select produced results with columns: price and volume and the 2nd select produced results with columns: lotSize and time, I would like to results of the query to show price, volume, lotSize and time.
I would like to avoid using a join because the results of the select statements will have many millions of rows.
Can this be done? If so conceptually, how is it done? I have attached the select statements but it is not necessary to show me the exact statement.
MySQL 5.0.45-community-nt via TCP/IP
MySQL Client Version 5.1.11
SELECT correlative,DATE_FORMAT(period,'%Y-%m-%d %h:%i') dateTimeWithoutSeconds,price open,max(price) high,
min(price) low, max(period) closePeriod, count(price) nTicks, NULL close, NULL upticks, NULL downticks, NULL flatticks FROM zz_tbl_ticks_6439 group by dateTimeWithoutSeconds order by period;
select dateTimeWithoutSeconds, sum(uptick) totalupticks, sum(downtick) totaldownticks, sum(flattick) totalflatticks
DATE_FORMAT(tbl1.period,'%Y-%m-%d %h:%i') dateTimeWithoutSeconds,if(tbl1.price-tbl2.price>0,1,0) uptick,
FROM zz_tbl_ticks_6439 tbl1,zz_tbl_ticks_6439 tbl2 where tbl1.correlative=tbl2.correlative-1) x2 group by x2.dateTimeWithoutSeconds