case when group by

SELECTCASEWHEN price ISNULLTHEN'Unpriced'WHEN price <10THEN'Bargain'WHEN price BETWEEN10and20THEN'Average'ELSE'Gift to impress relatives'ENDAS Range,      Title FROM titles GROUPBYCASEWHEN price ISNULLTHEN'Unpriced' 
The case when syntax in sql adds the log title here    
 
The case when syntax in sql adds the log title here        
    
The case when syntax in sql adds the log title here        
    
The case when syntax in sql adds the log title here        
      
The case when syntax in sql adds the log title here        
  
The case when syntax in sql adds the log title here    
 
The case when syntax in sql adds the log title here
The case when syntax in sql adds the log title here

The case when syntax in sql adds the log title here
  
The case when syntax in sql adds the log title here    
 
The case when syntax in sql adds the log title here        
    
The case when syntax in sql adds the log title here        
WHEN price <10THEN'Bargain'WHEN price BETWEEN10and20THEN'Average'ELSE'Gift to impress relatives'END     Title ORDERBYCASEWHEN price ISNULLTHEN'Unpriced'WHEN price <10THEN'Bargain'WHEN price BETWEEN10and20    
The case when syntax in sql adds the log title here        
      
The case when syntax in sql adds the log title here        
  
The case when syntax in sql adds the log title here    

The case when syntax in sql adds the log title here
The case when syntax in sql adds the log title here
  
The case when syntax in sql adds the log title here    
 
The case when syntax in sql adds the log title here        
    
The case when syntax in sql adds the log title here        
    
The case when syntax in sql adds the log title here        
    THEN'Average'ELSE'Gift to impress relatives'END     Title   
The case when syntax in sql adds the log title here        
  
The case when syntax in sql adds the log title here    

The case when syntax in sql adds the log title here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326097881&siteId=291194637