group by

fanfan2

Registered User.
Local time
Today, 10:54
Joined
Feb 26, 2007
Messages
61
I have the following table, I would like to group by ID and if there are consecutively same code, group by them, then pick the minimum valueA and maximun valueB within the group. I couldn't make it work, because if I group by ID and then group by code, then it picks all the same codes within the ID (not just the consecutive ones). Any help would be appreciated.

ID
CodevalueAvalueBAJAA00.7ASRC0.724AFYT2428.4AFYT28.430.65AFGKc30.6532.7AFGKf32.733.8AFGKc33.887.7AFGKf87.788.1AFGKc88.195.9BFGKf95.996.7BFGKc96.7121.8BVVN121.8122.4BFGKc122.4129BVVB129137.3BFGKc137.3148.55BVVN148.55149.1BFGKc149.1155.2BFGKc155.2168.6BFGKc168.6169.55
 
Sorry the table didn't show clearly in my previous posting, now file is attached. Thanks.
 

Attachments

Users who are viewing this thread

Back
Top Bottom