Return specific rows, cascading results in column - If no 1 then multiple 2s, else if no 2s then 3, else if no 3, then multiple 4s

前端 未结 0 1878
后悔当初
后悔当初 2020-12-15 21:54

I am working with student data in MS SQL and have some very specific rules to follow.

Sample Table

CREATE TABLE students (
    encounterId INT,
    s         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题