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:
Oracle 9i+ (maybe 8i too) has FIRST/LAST aggregate functions, that make computation over groups of rows according to row's rank in group. Assuming all rows as one group, you'll get what you want without subqueries:
SELECT
max(MEMBSHIP_ID)
keep (
dense_rank first
order by paym_date desc NULLS LAST
) as LATEST_MEMBER_ID
FROM user_payment
WHERE user_id=1