Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT *
- FROM
- (SELECT a.a AS a, a.b AS b, d.c AS c FROM table_a a JOIN table_d d on d.a = a.a),
- (SELECT c.a AS a, c.b AS b, d.c AS c FROM table_c c JOIN table_d d on d.a = ca.a),
- (SELECT b.a AS a, b.b AS b, d.c AS c FROM table_b b JOIN table_d d on d.a = b.a)
- Union results in ambiguous schema [d.c] is ambiguous and is aliasing multiple fields
- select *
- from
- (select a, b
- from table_a, table_b, table_c) as a
- join
- (select a, c
- from table_d) as d
- on a.a = d.a
Add Comment
Please, Sign In to add comment