I have 2 views of the form:
--View1
SELECT foo.id AS id FROM foo LEFT JOIN bar ON foo.id = bar.id
--Results
id
1
1
1
2
2
...
--View2
SELECT foo.id AS id FROM foo LEFT JOIN manchu ON foo.id = manchu.id
--Results
id
1
1
1
2
2
...
Now I want to join the two views so that row #1 from View1 is joined to row #1 of View2.
If I join on View1.id = View2.id, then the rows will multiply by each other, which isn't what I want. Is there a way I can add a column to each view with a unique number that I can join on? Or another solution?
Thanks in advance.