Sensibly designed databases have smooth, easy-to-understand definitions. This allows all users to understand the meaning of data in each table. It is an important way of removing data quality issues.
If you want to run the queries in this recipe as a test, then use the following examples. Alternatively, you can just check for problems in your own database:
CREATE SCHEMA s1;
CREATE SCHEMA s2;
CREATE TABLE s1.X(col1 integer,col2 TEXT);
CREATE TABLE s2.X(col1 integer,col3 NUMERIC);
First, we will...