From: Michael Modic Date: 2009-05-07T23:00:55+09:00 Subject: Re: How to break this down for use in a graph? Mark Thomas wrote: >> Please help! �:-( �If I need to structure my query differently, I can. >> Ruby is so beautiful and I know I am missing some easy way to do this >> and for the life of me I can't figure it out on my own. > > It would help if you show your model or at least 'p @results'. Then > show what you want as output. For me at least, code will be easier to > decipher than what you mean by things like "tied back to the rep". Sorry about that. Here's a sample of the results after calling .inspect. Should help clarify the structure of my resultset. #\"4\", \"sales_day\"=>\"2009-04-13\", \"sales_rep\"=>\"Michael\"}>, #\"2\", \"sales_day\"=>\"2009-04-13\", \"sales_rep\"=>\"John\"}>, #\"10\", \"sales_day\"=>\"2009-04-13\", \"sales_rep\"=>\"Jane\"}>, #\"1\", \"sales_day\"=>\"2009-04-14\", \"sales_rep\"=>\"Michael\"}>, #\"9\", \"sales_day\"=>\"2009-04-14\", \"sales_rep\"=>\"John\"}>, #\"7\", \"sales_day\"=>\"2009-04-14\", \"sales_rep\"=>\"David\"}>, #\"2\", \"sales_day\"=>\"2009-04-14\", \"sales_rep\"=>\"Albert\"}>]" -- Posted via http://www.ruby-forum.com/.