我有一个使用lag函数的列,我想将该列转换为'mm/dd/yyyy‘格式,并将其转换为文本。select to_char(LAG(time,1),'MM/DD/YYYY'::text) OVER (PARTITION BY a,b,c DESC) AS time from emp但我收到一个错误错误:"to_char“处或附近的语法错误
customer_id" as a, rfm_recency*100 + rfm_frequency*10 as rfm_combined(select a, ntile(4) over (order by frequency) as rfm_frequency) x max("purchase_date") as recency,
co
我是postgres的新手,我正在做我的一项任务。我必须创建一个只有1列的表,然后在pgadmin III上运行以下语句:INSERT INTO mytable VALUES (1);INSERTSAVEPOINT savepoint2;ROLLBACK TO savepoint2;当我运行这个命令时,我得到这个错误:语法错误在"IF“或</e