Check out example codes for "invalid reference to FROM-clause entry for table "unidades". It will help you in understanding the concepts better.

Code Example 1

remember to use the alias you used in from clause when using a column

Learn ReactJs, React Native from akashmittal.com