-- Database schema
| sales_in_weather : date [ DATE ] , store_nbr [ INTEGER ] , item_nbr [ INTEGER ] , units [ INTEGER ] | weather : station_nbr [ INTEGER ] , date [ DATE ] , tmax [ INTEGER ] , tmin [ INTEGER ] , tavg [ INTEGER ] , depart [ INTEGER ] , dewpoint [ INTEGER ] , wetbulb [ INTEGER ] , heat [ INTEGER ] , cool [ INTEGER ] , sunrise [ TEXT ] , sunset [ TEXT ] , codesum [ TEXT ] , snowfall [ REAL ] , preciptotal [ REAL ] , stnpressure [ REAL ] , sealevel [ REAL ] , resultspeed [ REAL ] , resultdir [ INTEGER ] , avgspeed [ REAL ] | relation : store_nbr [ INTEGER ] primary_key relation.store_nbr = sales_in_weather.store_nbr , station_nbr [ INTEGER ] relation.station_nbr = weather.station_nbr |
-- -- In March 2014, which weather stations recorded the highest number of days whose temperature is below the 30-year normal?

SELECT station_nbr FROM weather WHERE SUBSTR(`date`, 1, 4) = '2014' AND SUBSTR(`date`, 6, 2) = '03' AND depart < 0 GROUP BY station_nbr HAVING COUNT(DISTINCT `date`) = ( SELECT COUNT(DISTINCT `date`) FROM weather WHERE SUBSTR(`date`, 1, 4) = '2014' AND SUBSTR(`date`, 6, 2) = '03' AND depart < 0 GROUP BY station_nbr ORDER BY COUNT(`date`) DESC LIMIT 1 );