I need to sum the people based on the min and max age passed and the status (A=Active and B=Non Active) for the care center. Sum all the people fall under those min and max age limit and count the ages which made this sum and exclude the once not in the provided age range. User will be passing the min and max age.
The table looks something like this-
Age Count Status
65 30 A
66 12 A
86 8 B
70 10 A
82 9 B
61 28 A
77 30 A
76 12 A
73 8 B
If the user passes minage = 65 and maxage = 82 Then the result should look like
Output should look like this-
Active.AgeCnt TotalPeople InActive.AgeCnt TotalPeople
5 94 2 17
With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied?
You can use SQL Server Initialize from Backup…