>
> A sample of the current results data would be like
> datesales
> 2008-03-07 100.00
> 2007-03-10 150.00
> 2007-03-18 50.00
>
> and what I'm trying to do is fill in the missing dates with sales
> values of 0.
what I do is have a table called days t
On 3/19/08, Christopher Crews <[EMAIL PROTECTED]> wrote:
> and what I'm trying to do is fill in the missing dates with sales values of 0.
create or replace function gen_dates(sd date, ed date)
returns setof date as $$
select $1 + i
from generate_series(0, $2 - $1) i;
$$ language sql immutable;
se
2008/3/19, Christopher Crews <[EMAIL PROTECTED]>:
> Hi All,
> I'm not quite sure how to phrase this, but essentially my company has me
> working on some reports and I have some charts associated with the SQL
> results.
>
> My current query is:
>
> select
> transaction_date as date,
> sum(sa
Hi All,
I'm not quite sure how to phrase this, but essentially my company has me
working on some reports and I have some charts associated with the SQL results.
My current query is:
select
transaction_date as date,
sum(sale_amount) as sales
from ej_transaction
where transaction_date