Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- some_data, p_column, type
- pla, 1, a
- bla, 1, b
- sth, 1, a
- sth, 2, a
- some_data, p_column, type, rank
- pla, 1, a, 1
- bla, 1, b, 2
- sth, 1, a, 3
- sth, 2, a, 1
- some_data, p_column, type, rank
- bla, 1, b, 2
- sth, 2, a, 1
- for each partition:
- if type b is in partition:
- select row b with lowest rank
- else:
- select row a with lowest rank
Add Comment
Please, Sign In to add comment