Let's say you imported some data, but it contains duplicates. You will have to handle them in some way, but to make sensible choice on how to handle it, you need more information.
So, let's start. We have table:
# \d users Table "public.users" Column | Type | Modifiers ------------+--------------------------+---------------------------------------------------- id | integer | not null default nextval('users_id_seq'::regclass) username | text | registered | timestamp with time zone | Indexes: "users_pkey" PRIMARY KEY, btree (id)
Continue reading Tips N’ Tricks – Generating readable reports with plain SQL