I have data like these:
name_text ----------c_num---d_type-----unique_id----------------------v_text--r_ticket_id
29311875_FAD_V100.doc 3560709 Contract 21DABDDF49BA41289F1905D1D6B79ABF 2,01 28600206
29311875_FAD_V100.doc 3560709 Contract 21DABDDF49BA41289F1905D1D6B79ABF 2,01 28600240
Copy.docx 3560715 Guide 9D06F8EFF4EC4A2D862F5A0DB3BA357B 2 28600219
I want to select just one row which has the bigger value of r_ticket_id column, if name_text, c_num, d_type, unique_id, v_text columns values are equal.
In these case, with select statement just this columns should be fetched.
name_text ----------c_num---d_type-----unique_id----------------------v_text--r_ticket_id
29311875_FAD_V100.doc 3560709 Contract 21DABDDF49BA41289F1905D1D6B79ABF 2,01 28600240
Copy.docx 3560715 Guide 9D06F8EFF4EC4A2D862F5A0DB3BA357B 2 28600219
What is the exact SQL query that will do this job?