[GENERAL] How do I calculate the sum of a field filtered by multiple windows defined by another field?

2015-03-15 Thread Robert James
How do I calculate the sum of a field filtered by multiple windows defined by another field? I have table event with fields event_date, num_events, site_id. I can easily use aggregate SQL to do SELECT SUM(num_events) GROUP BY site_id. But I also have another table site with fields site_id,

Re: [GENERAL] How do I calculate the sum of a field filtered by multiple windows defined by another field?

2015-03-15 Thread David G. Johnston
On Sunday, March 15, 2015, Robert James srobertja...@gmail.com wrote: How do I calculate the sum of a field filtered by multiple windows defined by another field? I have table event with fields event_date, num_events, site_id. I can easily use aggregate SQL to do SELECT SUM(num_events) GROUP

Re: [GENERAL] How do I calculate the sum of a field filtered by multiple windows defined by another field?

2015-03-15 Thread Robert James
Version 9.2.4 On 3/15/15, David G. Johnston david.g.johns...@gmail.com wrote: On Sunday, March 15, 2015, Robert James srobertja...@gmail.com wrote: How do I calculate the sum of a field filtered by multiple windows defined by another field? I have table event with fields event_date,