If you want to select a whole row which has a max of something, you need to use window functions to partition and order the rows, then select the first in each partition.
with ordered_users as ( select *, -- This will be 1 for the bill_id with the highest complete_date. row_number() over ( partition by user_id order by complete_date desc ) as row_num from tbl_user_complete)select user_id, bill_id, complete_datefrom ordered_userswhere row_num = 1;