I have a table which looks like that:

As You see, there are some date duplicates, so how to select only one row for each date in that table?
the column ‘id_from_other_table’ is from INNER JOIN with the table above
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You mention that there are date duplicates, but it appears they’re quite unique down to the precision of seconds.
Can you clarify what precision of date you start considering dates duplicate – day, hour, minute?
In any case, you’ll probably want to floor your datetime field. You didn’t indicate which field is preferred when removing duplicates, so this query will prefer the last name in alphabetical order.