| 
	
		
		
			
			 
				
				[SQL] - Return last record with 30 days missing.
			 
			 
			
		
		
		I am not sure this is possible to do without code, but I figured I'd throw it up here for yall.. 
 
Say I have this table: 
 
SaleDate            SaleAmt 
01/01/2003        5 
01/15/2003        10 
02/26/2003        5 
02/27/2003        7 
 
In this query, I want to return 02/26/2003 because there have been more than 30 days since the last sale. I also only want the result to show the last time there were 30 days... previous ones do not matter. 
 
Is this possible? 
		
		
		
		
		
		
	 |