From: Robert Klemme Date: 2008-10-23T21:04:08+09:00 Subject: Re: Processing postgres table 2008/10/22 Dan Webb : > I'm using the ruby-postgres gem as ruby-pg isn't installing & as there > no longer seems to be any tutorials or how-tos I thought I'd ask here. > > Basically I'm trying to iterate through each row of data and assign the > values to some variables then print them out to XML (XML output's sorted > thanks to builder) > This is one set of that data, one question with 5 answers. How can I go > about finding out the number of rows that contain the same first column? SELECT question_stem, count(*) FROM RESULTS_JOIN group by question_stem Cheers robert -- remember.guy do |as, often| as.you_can - without end