Closed ismayc closed 6 years ago
I think the has_equal_ast
call below...
join_table = from_clause.check_field('right').has_equal_ast('countries', 'Did you join the `countries` table?')
should be written as has_equal_ast('Did you join ... ' , 'countries', 'expression')
You can tell which SCT is failing by the code that is highlighted. Since the it's highlighting the right field of the join, it has to be an SCT that's checking that part of the code.
(looks like something screwed up sqlwhat docs, will fix tomorrow)
Solution code is
So we'd expect it to report that
city2
was used instead ofcity
for the field alias.SCT code is
On Teach: https://www.datacamp.com/teach/edit/repositories/1069/branches/master On GitHub: https://github.com/datacamp/courses-joining-data-in-postgresql/blob/master/chapter1.md On campus: https://campus.datacamp.com/courses/joining-data-in-postgresql/15083?ex=3 (Task 3/3)
cc @colinricardo @machow