Starting
0 sec
ins Farm', 'Land
Table 'avaxe_nashville.PropertyIndex_tmp' doesn't exist

INSERT IGNORE INTO `PropertyIndex_tmp` ( MlsNumber, PropertyType, PropertyStatus, UnderContract, ListDate, Modified, StreetAddress, UnitNumber, City, County, State, ZipCode, Longitude, Latitude, AreaID, Description, ListPrice, SalePrice, ClosedDate, Beds, FullBaths, HalfBaths, SqFt, Acres, ListingAgentName, ListingAgentID, ListingAgentPhone, ListingCoListAgentName, ListingCoListAgentID, ListingCoListAgentPhone, ListingAgencyCode, ListingAgency, SellingAgentName, SellingAgentID, SellingAgentPhone, SellingCoAgentName, SellingCoAgentID, SellingCoAgentPhone, SellingAgencyCode, SellingAgency, Subdivision, ElementarySchool1, ElementarySchool2, MiddleSchool, HighSchool, Stories, SqFtMain, SqFtSecond, SqFtThird, SqFtBasement, TypeRange, Construction, ExteriorTrim, TotalRooms, PrimaryImageURL, PrimaryThumbURL, MediaUpdateDate, MediaID, VirtualTour, YearBuilt, NewConstruction, 1stFloorBedroom, SwimmingPool, Garage, Waterfront, Historic, Foreclosure ) SELECT RIGHT( ListingId, LENGTH( ListingId ) -3 ), 'LotsAndLand', IF( StandardStatus = 'Closed', 'off-market', 'active' ), IF( MlsStatus LIKE '%under contract%', 1, 0 ), ListingContractDate, ModificationTimestamp, UnparsedAddress, UnitNumber, City, CountyOrParish, StateOrProvince, PostalCode, Longitude, Latitude, MLSAreaMajor, PublicRemarks, ListPrice, ClosePrice, CloseDate, BedroomsTotal, BathroomsFull, BathroomsHalf, BuildingAreaTotal, LotSizeAcres, ListAgentFullName, SUBSTRING( ListAgentKey, 4 ), ListAgentPreferredPhone, CoListAgentFullName, SUBSTRING( CoListAgentKey, 4 ), CoListAgentPreferredPhone, SUBSTRING( ListOfficeKey, 4 ), ListOfficeName, BuyerAgentFullName, SUBSTRING( BuyerAgentKey, 4 ), BuyerAgentPreferredPhone, CoBuyerAgentFullName, SUBSTRING( CoBuyerAgentKey, 4 ), CoBuyerAgentPreferredPhone, SUBSTRING( BuyerOfficeKey, 4 ), BuyerOfficeName, SubdivisionName, ElementarySchool, NULL, MiddleOrJuniorSchool, HighSchool, Stories, NULL, NULL, NULL, NULL, NULL, ConstructionMaterials, NULL, NULL, NULL, NULL, PhotosChangeTimestamp, PhotosCount, VirtualTourURLBranded, YearBuilt, IF( NewConstructionYN = 1, 1, 0 ), IF( ISNULL( MainLevelBedrooms ), 0, 1 ), IF( PoolPrivateYN = 1, 1, 0), IF( GarageYN = 1, 1, 0 ), IF( WaterfrontYN = 1, 1, 0 ), IF( YearBuilt <= 1950, 1, 0 ), 0 FROM Property WHERE PropertyType IN ( 'Farm', 'Land' )