标签: postgresql postgresql-9.1 postgresql-9.2
哪个Postgres查询等同于以下Oracle查询?
select CID, max(cus.customer_id) keep (dense_rank first order by decode(acct.CUS_Type,'X',4,'M',5,'F',6,'G',7,'I',5,6), start_date) best_CUS from cusomer cus group by CID ;