I have a table that I need to select all fields and then group where three of 
the fields are the same (sample below Col1, Col2, Col3).  Group the unique 
combinations of the three fields.  If there is only one record in the group, 
report on it, if there is two or more then evaluate in this order:  if Col6 = 
“X” select record, continue to next unique grouping,  elseif Col6= “B” select 
record, continue to next unique grouping, elseif Col6= “C” select that 
record....go to the next group (there are three possible options always and I 
want them in the “X”,”B”,”C” order.  Sample below 

—————group—————— 
Col1             Col2.         Col3.        Col4.        Col5.       Col6. 
ABC.             TEN.        FOUR.         X.           L.             C.    
<—-Unique Row (selected to report on) 
ABC.             TEN.        FIVE.           X.           L.              C.   
<—-Unique Row (selected to report on) 
NNN.             JJJ.          LLL.            B.           L.               B. 
  <—-Group Row 1 (B is second choice) 
NNN.             JJJ.           LLL.           B.           L.              X.  
  <—-Group Row 2 (X is first report it) 

(Continue to next record or group) 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to