Subquery in Rails report generation -
I am creating a report in Ruby on Rails application and I understand how to use a subquery I'm struggling. / P> Every survey has 'survey response' and it is quite easy to retrieve them, although I need a group according to one of those areas, 'jobcod', because I only Want to report one related information to a single jobcode in one line in the report However, I need to know the component data that makes use of that job code because the reason I need to calculate data such as the media and standard deviation, and know the values like this Need to understand the total yoga. My thinking is that I get different jobs which are surveyed and then I receive personal responses to each jobcode as a loop through them. Is this the right way to do or should I follow a different method? You can use the named area to make groups of reactions easier to achieve: named_scope: job_group, lambda {| Job_code | {: Terms = & gt; Put it in your modeled model, an...