Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 11 months ago. Improve this question I have a table that has the following data id orderid 1 0 1 1 1 2 2 0 3 0 3 1 An id