I'm trying to figure out how to do something that is probably relatively easy. I'm not an expert but I'm halfway good with SQL.
In english:
Columns:
Factor 1 (easily defined),
Factor 2 (easily defined),
Factor 3 (easily defined),
Factor 4:
Value A: if the count of Value B (for Factor 4) within Factors 1 and 2 or the count of Value C (for Factor 4) within Factors 1 and 2 is less than 5, Value A = 1
Value B: if Value A = 1, null else 2
Value C: if Value A = 1, null else 3
This calculation would logically loop back on itself which is probably why I can't figure out how to do it. Does anyone have any suggestions? This would be a summary of record (individual people) level data.
In english:
Columns:
Factor 1 (easily defined),
Factor 2 (easily defined),
Factor 3 (easily defined),
Factor 4:
Value A: if the count of Value B (for Factor 4) within Factors 1 and 2 or the count of Value C (for Factor 4) within Factors 1 and 2 is less than 5, Value A = 1
Value B: if Value A = 1, null else 2
Value C: if Value A = 1, null else 3
This calculation would logically loop back on itself which is probably why I can't figure out how to do it. Does anyone have any suggestions? This would be a summary of record (individual people) level data.