szymski

Untitled

May 21st, 2021
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1.  
  2.  
  3.  
  4. with summary as (
  5. select m.id, m.title, row_number() over(partition by m.title) as rank, count(m.id) over(partition by m.title) as count
  6. from public."Mail" m
  7. )
  8. select *
  9. from summary
  10. where rank = 1
Advertisement
Add Comment
Please, Sign In to add comment