Detected 4 occurrence(s) of ‘\bpatient\b(.|\b|\r){0,45}\b(id|dob|claim|NPI|record)\b’: th, 1, mon) FROM months WHERE m < '2014-12-01' ) SELECT mon, COUNT(*) FROM patient p CROSS JOIN months m CROSS APPLY ( SELECT TOP 1 active FROM status s WHERE s.patient = p.id AND s.ts <= m.mon ORDER BY ts DESC, id DESC ) s WHERE s.active = 1 […]
↧