Postgresql – Find unique data types in table. SQL
I have the task of finding all unique data types in all the tables. This is how I wrote the SQL query: WITH UniqueColumnTypes AS ( SELECT table_name, COUNT(DISTINCT data_type) AS unique_types FROM information_schema.columns WHERE table_schema NOT IN ('pg_catalog', 'information_schema')…