+------+-------+---------+--------+------+------+ | :sid | :name | :status | :city | :pid | :qty | +------+-------+---------+--------+------+------+ | S1 | Smith | 20 | London | P1 | 300 | | S1 | Smith | 20 | London | P2 | 200 | | S1 | Smith | 20 | London | P3 | 400 | | S1 | Smith | 20 | London | P4 | 200 | | S1 | Smith | 20 | London | P5 | 100 | | S1 | Smith | 20 | London | P6 | 100 | | S2 | Jones | 10 | Paris | P1 | 300 | | S2 | Jones | 10 | Paris | P2 | 400 | | S3 | Blake | 30 | Paris | P2 | 200 | | S4 | Clark | 20 | London | P2 | 200 | | S4 | Clark | 20 | London | P4 | 300 | | S4 | Clark | 20 | London | P5 | 400 | +------+-------+---------+--------+------+------+