[sql] SQL selecting rows by most recent date with two unique columns