unique-agg
v1.0.2
Published
Returns the unique not null value OR raise an exception
Downloads
2
Maintainers
Readme
unique-agg
Returns the unique not null value OR raise an exception
Case of use
When you need to normalize the content of an imported table, unique_agg
checks the data while inserting in the new table.
For example you have imported_data
tabla and want to extract info for countries
and cities
tables.
INSERT INTO countries (country_id, country_name)
SELECT country_id, unique_agg(country_name)
FROM imported_data
GROUP BY country_id;
Install
psql < bin/create_unique_agg.sql