In Oracle I can select a constant value that will populate down the column like this:
Select
"constant" constantvalue,
orders.name
from
orders
and it will yield:
ConstantValue Name
constant sandwich
constant burger
For whatever reason, when I try to do this in postgres I receive this error.
ERROR: column "Constant" does not exist
here is my code
select
date_trunc('day', measurement_date + (interval '1 day' * (6 - extract(dow from measurement_date)))) week,
"AROutstanding" colname,
round(avg(Total_Outstanding),0) numbah
from
(
select
measurement_date,
sum(cast(sum_of_dollars as numeric)) Total_Outstanding
from
stock_metrics
where
invoice_status not in ('F','Write off')
group by
measurement_date
) tt
group by
week