I want to be able to select a bunch of rows from a table of e-mails and group them by the from sender. My query looks like this: The query almost works as I want it — it selects records grouped by e-mail. The problem is that the subject and timestamp don’t correspond to the most recent record for a
Tag: sql-order-by
MS Sql: Conditional ORDER BY ASC/DESC Question
I want to to make to make the ordering in my query conditional so if it satisfiess the condition it should be ordered by descending For instance: Answer Don’t change the ASC or DESC, change the sign of the thing being sorted-by: The OP asks: Guys, I am not the SQL Expert, please explain me what means the id and