Allan Kamau wrote: > Hi all, > I have a plain sql problem (didn't know where else to post it). pgsql-sql > I have a list of transactions (market basket) ... Your use of the term "transaction" for a database entity is really confusing, and will make it significantly harder for others to understand and work with your schema. It might be worth renaming the entity to avoid the conflict with the meaning of "transaction" as "atomic unit of work" as controlled by BEGIN/COMMIT/ROLLBACK . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general