I have 2 tables: table_a and table_b. Both contain a column named 'open'.
table_a
+-------+
| open |
+-------+
| 36.99 |
| 36.85 |
| 36.40 |
| 36.33 |
| 36.33 |
+-------+
table_b
+------+
| open |
+------+
| 4.27 |
| 4.46 |
| 4.38 |
| 4.22 |
| 4.18 |
+------+
I'd like to write a query that returns the following
+-------++------+
| open || open |
+-------++------+
| 36.99 || 4.27 |
| 36.85 || 4.46 |
| 36.40 || 4.38 |
| 36.33 || 4.22 |
| 36.33 || 4.18 |
+-------++------+
I attempt the following query:
select a.open, b.open from table_a a, table_b b;
This returns a table with every value of table_b.open for each value of table_a.open
+-------++------+
| open || open |
+-------++------+
| 36.99 || 4.27 |
| 36.99 || 4.46 |
| 36.99 || 4.38 |
| 36.99 || 4.22 |
| ... || 4.18 |
+ ... ++------+
I can see I'm misunderstanding proper usage of aliases here. Any ideas?