Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- ps.WeekIncluded AS PaidWeeks,
- PayD.PayDate AS PayDates,
- ps.PayYear AS PYear,
- months.PMonth,
- (SELECT sum(DayPay) FROM Shifts GROUP BY WeekNumber)
- FROM dbo.PayStructure ps
- JOIN dbo.Months Months
- ON ps.MonthID = months.ID
- JOIN dbo.PayDates PayD ON ps.MonthID = PayD.MonthID
- Group BY ps.MonthID
- SELECT
- ps.WeekIncluded AS PaidWeeks,
- PayD.PayDate AS PayDates,
- ps.PayYear AS PYear,
- months.PMonth,
- (SELECT sum(DayPay) FROM Shifts)
- FROM dbo.PayStructure ps
- JOIN dbo.Months Months
- ON ps.MonthID = months.ID
- JOIN dbo.PayDates PayD ON ps.MonthID = PayD.MonthID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement