4
Answers

how to select Query to show Groupwise data ?

Karthik K

Karthik K

4d
53
1

Hi All , 

          we require to have query to show the data with groupwise data in the query. can anyone suggest with sample query . 

 MYQUUERY:   select * from da5.SwitchPrice as S inner join da5.SwitchPriceGroup as G on S.PSGID=G.PSGID;

   Result we got :
   Barcode SwitchPrice  PSGID   PSGroup
______________________________________________
   A01        Price2    1       LUNCH
   A02        Price3    1       LUNCH
   A03        Price4    1       LUNCH
   A04        Price3    2       EVENING         


   Result we desire to  get :

   Barcode SwitchPrice  PSGID   
________________________________________________
   PSGROUP :LUNCH
   A01        Price2    1       
   A02        Price3    1       
   A03        Price4    1       
   PSGROUP :EVENING 
   A04        Price3    2      
 

 Thanks in advance 

Answers (4)