Rich Shepard <[EMAIL PROTECTED]> wrote:
The table has 180 rows and 31 columns. What I need to do is extract the records and group them by two columns (one as a sub-group of the other). However, even one 'group by' retrieves only three records, the last one for each group:
Yes, that's what GROUP BY does. One representative for each group.
What I expected was all 180 records, with 60 in each of the 'cat' fields (second field above).
select * from voting order by cat;
Ultimately, I need to group them by the second field (name == 'cat') and within each of those, sub-group them by the third field (name == 'pos').
select * from voting order by cat, pos; Igor Tandetnik ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------