MAX(DATE) - SQL ORACLE

前端 未结 5 2108
感动是毒
感动是毒 2021-02-20 03:03

I want to select only the latest membership_id from table user_payments of the user with the user_id equal to 1.

This is how the table user_payment looks like:



        
5条回答
  •  再見小時候
    2021-02-20 03:34

    Try with:

    select TO_CHAR(dates,'dd/MM/yyy hh24:mi') from (  SELECT min  (TO_DATE(a.PAYM_DATE)) as dates from user_payment a )
    

提交回复
热议问题