Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
| week | yearweek | 
| 201405 | 20140105 | 
| 201406 | 20140106 | 
| 201406 | 20140206 | 
| 201407 | 20140207 | 
| 201408 | 20140208 | 
| 201409 | 20140209 | 

How to find out count of those Yearweek which come twice as per week.. in script ?
In this example 20140106 and 20140206 comes 2 time in 201406 week..
so how to write code in script.
 maxgro
		
			maxgro
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		RESULT

SCRIPT
source:
load * inline [
week, yearweek
201405, 20140105
201406, 20140106
201406, 20140206
201407, 20140207
201408, 20140208
201409, 20140209
];
load
week, if(count(distinct yearweek)>1, 1, 0) as flagmorethanoncexweek
Resident source
group by week;
 maxgro
		
			maxgro
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		RESULT

SCRIPT
source:
load * inline [
week, yearweek
201405, 20140105
201406, 20140106
201406, 20140206
201407, 20140207
201408, 20140208
201409, 20140209
];
load
week, if(count(distinct yearweek)>1, 1, 0) as flagmorethanoncexweek
Resident source
group by week;
