SELECT * 
FROM trackingnumbers 
WHERE gateway = 'fedex' 
AND shipdate > (CURDATE() - INTERVAL 6 MONTH)
AND form = '';