I’m a ruby on rails newby and trying to figure out how I can execute a
schema query like this.
generatorfacts.hour_id = hours.id and
generatorfacts.thedate_id = thedates.id and
generatorfacts.generator_id = generators.id and
thedates.weekday_name = ‘Monday’
group by generators.Unit,thedates.weekday_name,hours.thehour
having sum(generatorfacts.rtrevenue) > 0
This is a standard data warehouse type, star schema query.
I’ve been reading and trying things in script console but I’m hoping
out there can give me a head start.
I’m as far using has_many :through, and belongs_to in my models. I’ve
heard that someone named Ken Kunz is developing an acts_as_fact plugin
may be just what I need. Can anybody walk me through how I would