string(2519) "SELECT temp.*,city.City,city.simplified AS citysimplified,co.county,co.simplified AS cosimplified,s.state,s.simplified AS statesimplified,t.latest_status,t.True_status_simplified FROM (
(
SELECT Zip,UpDateTime,True_statusid,PropertyTypeid ,ListPrice,Beds,Baths,Sqft,LotSize,YearBuilt,Address,ImageCity,image_main,listdate,HomeID,"" as agentid,"0" AS agent_house_sign ,"0" AS agent_top_sign ,"" AS titleDes, StatusID, table1_name, table1_id FROM home FORCE INDEX (coveringindex1) WHERE StatusID in (102) AND `True_statusid` > 0 AND `UpDateTime`>=0 AND `LotSize`> 43560 AND `LotSize`< 130680 AND `Beds` >= 1 and (`True_statusid` >= 0) and SUBSTRING(ImageCity,1,8)<'20241007' order by UpDateTime desc limit 1000
)
Union all
(
SELECT Zip,UpDateTime,True_statusid,PropertyTypeid ,ListPrice ,Beds ,Baths ,Sqft,LotSize,YearBuilt,Address ,ImageCity,ImageNames as image_main ,listdate ,HomeID,agentid ,"0" AS agent_house_sign ,"1" AS agent_top_sign ,titleDes, StatusID, '' as table1_name, '' as table1_id FROM home_agent WHERE StatusID in (102) AND `True_statusid` > 0 and `agentid` in(14,500,850,1170,1492,1525,1859,2131,2145,2383,2786,2820,2821,2822,2823,2824,2825,2826,2828,2829,2830,2831,2832,2833,2834,3416,3470,3491,3644,3799,3997,4424,4433,4454,4495,4518,4628,4639,4640,4656,4660,4665,4681,7636,7640,7662,7685,7708) AND `activate`=1 AND `ListPrice`> 100000 AND `LotSize`> 43560 AND `LotSize`< 130680 AND `Beds` >= 1 and top_house = 0 and ImageNames != '' order by UpDateTime desc limit 1000
)
Union all
(
SELECT Zip,UpDateTime,True_statusid,PropertyTypeid ,ListPrice ,Beds ,Baths ,Sqft,LotSize,YearBuilt,Address ,ImageCity,ImageNames as image_main,listdate ,HomeID,agentid ,"1" AS agent_house_sign ,"1" AS agent_top_sign ,titleDes, StatusID, '' as table1_name, '' as table1_id FROM home_agent WHERE `activate`=1 and top_house = 1 and StatusID in (102) AND `True_statusid` > 0 and `agentid` in(1170,1525,7640,7708) AND `ListPrice`> 100000 AND `LotSize`> 43560 AND `LotSize`< 130680 AND `Beds` >= 1 and ImageNames != '' order by UpDateTime desc limit 9
)
) AS temp LEFT JOIN True_status AS t ON temp.True_statusid = t.True_statusid
LEFT JOIN `status` AS city ON temp.StatusID = city.StatusID
LEFT JOIN county AS co ON city.idcounty = co.idcounty
LEFT JOIN state AS s ON co.idstate = s.idstate ORDER BY agent_house_sign desc, UpDateTime desc,HomeID asc limit 0,20"
SELECT co.idcounty,city.City,city.simplified AS cityname,s.state,s.fullstate,h.Zip,h.UpDateTime,h.True_statusid,h.PropertyTypeid,h.ListPrice ,h.Beds,h.Baths,h.Sqft,h.LotSize,h.YearBuilt,h.Address ,h.ImageCity,h.image_main,h.listdate,h.HomeID,h.StatusID,h.table1_name,h.table1_id
FROM home AS h LEFT JOIN status AS city ON h.StatusID = city.StatusID LEFT JOIN county AS co ON city.idcounty = co.idcounty LEFT JOIN state AS s ON co.idstate = s.idstate
WHERE h.recommend = 1 and h.ListPrice>0 AND h.StatusID in (102) ORDER BY h.UpDateTime desc limit 6