test=> select * from kings join wives on (wives.king_id = kings.id) order by kings.name, wives.name;
id | name | id | name | king_id
----+------+----+------+---------
1 | Alex | 1 | Ann | 1
1 | Alex | 2 | Bee | 1
1 | Alex | 3 | Jane | 1
2 | Bob | 4 | Sue | 2
3 | Carl | 5 | Jane | 3
3 | Carl | 6 | Jen | 3
4 | Dave | 7 | May | 4
(7 rows)
Alex's wives: Ann, Bee, Jane
Carl's wives: Jane, Jen
-John
--
Source: https://github.com/siracusa/rose
CPAN: http://search.cpan.org/dist/Rose-DB-Object
---
You received this message because you are subscribed to the Google Groups "Rose::DB::Object" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rose-db-objec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rose-db-object/1911c34c-37eb-42d3-84e3-ea75a0aa42d1n%40googlegroups.com.