Dear all,I need to count all pairs of instances which occure under given ID number, e.g.:
ID word -------------1 car 1 fruit
2 car 2 fruit 2 vegetable 3 car 3 vegetable And the output should be simillar to: car fruit 2 car vegetable 2 fruit vegetable 1 Any suggestion how to do that in PgSQL? Thanks in advance for any pointers. Cheers, Andrej