Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a.[Region],
- a.[Country],
- a.[site],
- a.[Account Type],
- q.[month],
- q.[account],
- q.[metric],
- q.[Goal],
- q.[Unit],
- q.[Actual],
- q.[Waived],
- q.[Weight],
- q.[Achieved],
- q.[SubmittedDateTime]
- from [accountTable] a right join [scoreTable] q, (select
- max(q.[SubmittedDateTime]) as max_date
- group by q.[Month]) on a.[account] = q.[account]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement