Advertisement
Pandaaaa906

Untitled

Mar 10th, 2021
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. select *
  2. from(
  3. SELECT
  4. row_number() over(partition by [proDefine6], [brand], [cinvCode] order by [cinvCode]) r,
  5. count(*) over(partition by [proDefine6], [brand], [cinvCode]) c,
  6. *
  7. FROM [dbo].[product]
  8. ) tmp
  9. where tmp.c>1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement