![microsoft sql server microsoft sql server](https://www.itprotoday.com/sites/itprotoday.com/files/styles/article_featured_standard/public/uploads/2015/05/wp20150506131605rich_1.jpg)
100 % Percentage Score in three rows (40 + 25 + 35). 100 % Percentage Score in two rows (50 + 50). And for an employee, the change for these 4 columns (PayGroupName, PayTypeName, SiteName, Region) happen only at the calendar day level, NOT at the level of PercentageScore column or at the level of Center, Function, Department columns. The source dataset has been developed in such a way that - every calendar day must account for 100 % for any employee, and there is NO gap in the calendar days. See example queries on the source dataset to get an idea as to what I mean. Scores (say, 40 + 25 + 35 in three rows (or) 50 + 50 in two rows), which will add up to 100 % for that calendar day.
![microsoft sql server microsoft sql server](https://s33046.pcdn.co/wp-content/uploads/2020/01/downloading-the-sql-server-2019-express-install-pa.png)
Alternately she may attain 100 % Percentage Score on another calendar day, with different combinations of these 3 columns - Center, Function, Department - in multiple rows, with splits in Percentage There is no gap in the calendar days for any employee, in the time period mentioned here (Apr 5, 2021).Īn employee may attain 100 % Percentage Score in one row for a given calendar day, with one unique value each, under each column - Center, Function, Department. Goal: I am trying to track how an employee attained 100 % Percentage Score over a period of time, and develop groups to display this information, with a new MinDate and MaxDate column, to show the range of dates for which a group existed.
![microsoft sql server microsoft sql server](https://www.hawkdive.com/media/sql-server.jpg)
ORDER BY EmployeeId, EverySingleCalendarDate You can use these scripts to see the sample of the source data: CREATE TABLE #SourceDataset (This is just a small sample subset of my actual data). I have a source dataset that has data for all five of them on all calendar days between and Apr 5, 2021.