Using MS SQL Server 2014. I need to select the row where (userid=1 or memberid=1) that has the max(messageid) value from all the messages where the user #1 sent or received messages ordered by messageid descUsing MS SQL Server 2014. I need to select the