SELECT COUNT(1) as total FROM `_rewidx_listings` `t1` WHERE (`ListingType` = 'Residential') AND ((( `t1`.`ListingFeedComponent` IN('bearfl','bearfl_sold') AND ((FIND_IN_SET('Single Family', REPLACE(`ListingSubType`, ', ', ','))))) OR ( `t1`.`ListingFeedComponent` IN('bmls','bmls_sold') AND ((FIND_IN_SET('Single Family Detached', REPLACE(`ListingSubType`, ', ', ','))))) OR ( `t1`.`ListingFeedComponent` IN('gflr','gflr_sold') AND ((FIND_IN_SET('Residential-Single Family', REPLACE(`ListingSubType`, ', ', ',')) OR FIND_IN_SET('Single', REPLACE(`ListingSubType`, ', ', ','))))) OR ( `t1`.`ListingFeedComponent` IN('mar','mar_sold') AND ((`ListingSubType` = 'Single Family Residence'))) OR ( `t1`.`ListingFeedComponent` IN('mfr','mfr_sold') AND ((`ListingSubType` = 'Single Family Home' OR `ListingSubType` = 'Single Family'))) OR ( `t1`.`ListingFeedComponent` IN('nabor','nabor_sold') AND ((FIND_IN_SET('Single Family', REPLACE(`ListingSubType`, ', ', ','))))) OR ( `t1`.`ListingFeedComponent` IN('pbbor','pbbor_sold') AND ((`ListingSubType` = 'Residential' OR `ListingSubType` = 'Single Family/Residential Estate'))) OR ( `t1`.`ListingFeedComponent` IN('ragfmb','ragfmb_sold') AND ((FIND_IN_SET('Single Family', REPLACE(`ListingSubType`, ', ', ','))))) OR ( `t1`.`ListingFeedComponent` IN('ramc','ramc_sold') AND ((`ListingSubType` = 'Detached'))))) ORDER BY t1.ListingPrice DESC