SET CHARACTER SET UTF8

SET @@session.time_zone='+00:00'

SET @@sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

SELECT * FROM vwr1_site_master WHERE concat_ws('',site_sub_domain,'.',site_domain) = 'willsellsboji.com'

SELECT * FROM vwr1_site_master WHERE site_domain = 'willsellsboji.com' OR INSTR( 'willsellsboji.com', site_domain ) > 0 ORDER BY site_id

SELECT config_name, config_value FROM vwr1_web_config WHERE config_site_id = 70 AND config_name IN ( 'site_title', 'site_working_city_ids', 'site_working_area_ids','site_working_property_type_ids','site_working_sub_type_ids')

SELECT * FROM vwr1_web_config WHERE config_site_id IN(SELECT site_id from vwr1_site_master WHERE site_type='office') AND config_name NOT IN(SELECT config_name FROM vwr1_web_config WHERE config_value!='' AND config_site_id IN(70,0) AND is_trash='No') AND config_name NOT IN ("listings_seo_configurations_old2", "listings_seo_configurations_old") AND is_trash="No"

SELECT * FROM vwr1_web_config WHERE config_site_id IN(70,0) AND config_name NOT IN ("listings_seo_configurations_old2", "listings_seo_configurations_old") AND is_trash="No"

SELECT *, site_domain as main_domain, Concat( CASE WHEN site_sub_domain<>'' THEN concat_ws('',site_sub_domain,'.',site_domain) WHEN site_sub_domain='' THEN site_domain END ) as site_domain FROM vwr1_site_master WHERE site_id IN ('70')

SELECT * FROM vwr1_theme_config WHERE site_id = 70 AND theme_id = 1

SELECT * FROM vwr1_page_master WHERE 1 AND is_trash='No' AND page_site_id = 70 AND page_visible = 'Yes' AND page_type NOT IN ('HiddenLink','ExternalLink','0') ORDER BY page_order ASC , page_title ASC

SELECT * FROM vwr1_theme_master

SELECT * FROM vwr1_page_master WHERE 1 AND is_trash='No' AND page_site_id = 70 AND page_visible = 'Yes' AND page_type NOT IN ('HiddenLink','ExternalLink','0') ORDER BY page_order ASC , page_title ASC

SELECT * FROM vwr1_page_master WHERE page_position = 'Menu' AND page_visible = 'Yes' AND is_trash ='No' AND page_site_id = '70' AND page_content LIKE '%[[PropertySearchForm id=1 ]]%';

SELECT * FROM vwr1_listing_forms WHERE 1 AND is_trash='No' AND is_admin_form='No' ORDER BY title ASC

INSERT INTO vwr1_session_master (session_id, session_user_id, session_start, session_time, session_ip, session_logged_in, created_at) VALUES ( 'bacbdb8a3ce121311a00e6ce3c8baaf0' , '2' , '1762421025' , '1762421025' , '216.73.216.166' , '0' , '2025-11-06 09:23:45' )

SELECT * FROM vwr1_listing_fields WHERE listing_field='Yes' AND is_trash='No' ORDER BY display_order ASC

SELECT O.*, O.office_city AS office_city_name,S.state_name AS office_state, S.state_code AS office_state_code FROM vwr1_office_roster_master AS O INNER JOIN vwr1_geo_state AS S ON S.state_code = O.office_state WHERE O.is_trash = 'No'

SELECT * FROM vwr1_agent_roster_master WHERE agent_id IN ('129')

SELECT srole_id, srole_name FROM vwr1_sysuser_role WHERE 1 AND is_trash='No' AND is_active="Yes" ORDER BY srole_name ASC

SELECT * FROM vwr1_geo_state WHERE 1 AND is_trash='No' AND state_visible = "Yes" ORDER BY state_name ASC

SELECT * FROM vwr1_geo_state

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master WHERE is_default='Yes' AND is_trash='No'

SELECT DISTINCT * FROM vwr1_listing_meta_general WHERE type = 'status' AND meta_rets != '' AND is_trash='No' AND is_visible = 'Yes' ORDER BY display_order, title

SELECT etmpl_cat_id, etmpl_cat_title FROM vwr1_email_template_categories WHERE 1 AND is_trash='No' ORDER BY etmpl_cat_title ASC

SELECT * FROM vwr1_web_config WHERE config_site_id IN(SELECT site_id from vwr1_site_master WHERE site_type='office') AND config_name NOT IN(SELECT config_name FROM vwr1_web_config WHERE config_value!='' AND config_site_id IN(70) AND is_trash='No') AND config_name NOT IN ("listings_seo_configurations_old2", "listings_seo_configurations_old") AND is_trash="No"

SELECT * FROM vwr1_web_config WHERE config_site_id IN(70) AND config_name NOT IN ("listings_seo_configurations_old2", "listings_seo_configurations_old") AND is_trash="No"

SELECT * FROM vwr1_site_master WHERE site_type = "office"

SELECT *, site_domain as main_domain, Concat( CASE WHEN site_sub_domain<>'' THEN concat_ws('',site_sub_domain,'.',site_domain) WHEN site_sub_domain='' THEN site_domain END ) as site_domain FROM vwr1_site_master WHERE site_id IN ('2')

SELECT * FROM vwr1_theme_config WHERE site_id = 2 AND theme_id = 1

SELECT * FROM vwr1_site_master WHERE site_agent_id = '129'

SELECT *, site_domain as main_domain, Concat( CASE WHEN site_sub_domain<>'' THEN concat_ws('',site_sub_domain,'.',site_domain) WHEN site_sub_domain='' THEN site_domain END ) as site_domain FROM vwr1_site_master WHERE site_id IN ('70')

SELECT MM.mlsp_id, MM.mls_disclaimer_big, MM.mls_disclaimer_short, MM.mls_disclaimer_icon, MM.last_run_datetime FROM vwr1_mls_master AS MM WHERE 1 AND MM.mls_market_active = 'Yes'

SELECT * FROM vwr1_lead_campaign WHERE 1 AND ((ldcampaign_start_date = '0000-00-00' AND ldcampaign_end_date = '0000-00-00') OR ('2025-11-06' BETWEEN ldcampaign_start_date AND ldcampaign_end_date)) AND ldcampaign_active = 'Yes' AND FIND_IN_SET(70,ldcampaign_site_ids) AND FIND_IN_SET('Desktop',ldcampaign_device_types) AND is_trash = 'No'

SELECT * FROM vwr1_agent_roster_master WHERE is_default='Yes' AND is_trash='No'

SELECT * FROM vwr1_office_roster_master WHERE office_active='Yes' AND is_trash='No'

SELECT agent_id FROM vwr1_agent_roster_master AS M WHERE is_default = 'Yes' AND agent_active = 'Yes' AND is_trash ='No' and agent_id='3'

SELECT LM.*,mls_is_pic_url_supported,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE LM.ml_num = '240340' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_on_web = 'Yes' UNION SELECT LM.*,mls_is_pic_url_supported,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master_inactive AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE LM.ml_num = '240340' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_on_web = 'Yes'

SELECT * FROM vwr1_listing_data WHERE listing_key = '240340-2'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Expired"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "210th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7560' AND is_trash = 'No'

SELECT * FROM vwr1_person_master WHERE user_auth_id = 1

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7560')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240340-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240340-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_virtual_tours WHERE listing_key = '240340-2'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240340-2' ORDER BY display_order ASC

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_id = 129 AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_agent_team WHERE id IN ('6')

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7560-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT agent_id, agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE 1 AND is_trash='No' AND agent_active = 'Yes' AND agent_team_id = 6 AND agent_first_name !='' ORDER BY agent_first_name, agent_last_name

SELECT agent_id, CONCAT(agent_first_name, ' ', agent_last_name) AS agent_name, agent_key FROM vwr1_agent_roster_master WHERE is_trash = 'No' AND agent_team_id IN ( SELECT id FROM vwr1_agent_team WHERE id = '6' AND is_active = 'Yes' AND is_trash = 'No' ) ORDER BY RAND() LIMIT 3

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7556-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7629-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_meta_geo WHERE type = 'city' AND city_visible = 'Yes'

SELECT * FROM vwr1_listing_meta_general WHERE type = 'status' AND is_visible = 'Yes' AND is_trash = 'No'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.list_price_current BETWEEN 169500 AND 282500 AND LM.ml_num NOT IN('240340') AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.list_price_current BETWEEN 169500 AND 282500 AND LM.ml_num NOT IN('240340') AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS'

SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.list_price_current BETWEEN 169500 AND 282500 AND LM.ml_num NOT IN('240340') AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master_inactive AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.list_price_current BETWEEN 169500 AND 282500 AND LM.ml_num NOT IN('240340') AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' ORDER BY listing_date asc LIMIT 0, 6

SELECT MM.mlsp_id, MM.mls_disclaimer_big, MM.mls_disclaimer_short, MM.mls_disclaimer_icon, MM.last_run_datetime FROM vwr1_mls_master AS MM WHERE 1 AND MM.mls_market_active = 'Yes'

SELECT * FROM vwr1_listing_data WHERE listing_key = '221338-2'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "RESIDENTIAL"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Duplex"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "34th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = "Attached"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = "Contemporary"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = "1"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7725' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7725')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221338-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221338-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_virtual_tours WHERE listing_key = '221338-2'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221338-2' ORDER BY display_order ASC

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_id = 129 AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7725-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT agent_id, CONCAT(agent_first_name, ' ', agent_last_name) AS agent_name, agent_key FROM vwr1_agent_roster_master WHERE is_trash = 'No' AND agent_team_id IN ( SELECT id FROM vwr1_agent_team WHERE id = '6' AND is_active = 'Yes' AND is_trash = 'No' ) ORDER BY RAND() LIMIT 3

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7629-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7556-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221338-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_data WHERE listing_key = '221339-2'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "RESIDENTIAL"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Duplex"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "34th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = "Attached"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = "Contemporary"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = "1"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7725' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7725')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221339-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221339-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_virtual_tours WHERE listing_key = '221339-2'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221339-2' ORDER BY display_order ASC

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_id = 129 AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7725-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT agent_id, CONCAT(agent_first_name, ' ', agent_last_name) AS agent_name, agent_key FROM vwr1_agent_roster_master WHERE is_trash = 'No' AND agent_team_id IN ( SELECT id FROM vwr1_agent_team WHERE id = '6' AND is_active = 'Yes' AND is_trash = 'No' ) ORDER BY RAND() LIMIT 3

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7556-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7629-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221339-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_data WHERE listing_key = '221340-2'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "RESIDENTIAL"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Duplex"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "34th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = "Attached"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = "Contemporary"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = "1"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7725' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7725')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221340-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221340-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_virtual_tours WHERE listing_key = '221340-2'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221340-2' ORDER BY display_order ASC

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_id = 129 AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7725-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT agent_id, CONCAT(agent_first_name, ' ', agent_last_name) AS agent_name, agent_key FROM vwr1_agent_roster_master WHERE is_trash = 'No' AND agent_team_id IN ( SELECT id FROM vwr1_agent_team WHERE id = '6' AND is_active = 'Yes' AND is_trash = 'No' ) ORDER BY RAND() LIMIT 3

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7629-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7556-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221340-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_data WHERE listing_key = '221341-2'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "RESIDENTIAL"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Duplex"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "34th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = "Attached"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = "Contemporary"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = "1"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7725' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7725')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221341-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221341-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_virtual_tours WHERE listing_key = '221341-2'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221341-2' ORDER BY display_order ASC

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_id = 129 AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7725-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT agent_id, CONCAT(agent_first_name, ' ', agent_last_name) AS agent_name, agent_key FROM vwr1_agent_roster_master WHERE is_trash = 'No' AND agent_team_id IN ( SELECT id FROM vwr1_agent_team WHERE id = '6' AND is_active = 'Yes' AND is_trash = 'No' ) ORDER BY RAND() LIMIT 3

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7629-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7556-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221341-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_data WHERE listing_key = '231318-2'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "RESIDENTIAL"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Single Family Residence"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "34th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = "Attached"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = "Contemporary"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = "1"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7725' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7725')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231318-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231318-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_virtual_tours WHERE listing_key = '231318-2'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231318-2' ORDER BY display_order ASC

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_id = 129 AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7725-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT agent_id, CONCAT(agent_first_name, ' ', agent_last_name) AS agent_name, agent_key FROM vwr1_agent_roster_master WHERE is_trash = 'No' AND agent_team_id IN ( SELECT id FROM vwr1_agent_team WHERE id = '6' AND is_active = 'Yes' AND is_trash = 'No' ) ORDER BY RAND() LIMIT 3

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7556-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7629-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231318-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_data WHERE listing_key = '250122-2'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "RESIDENTIAL"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Single Family Residence"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "11Th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = "Attached"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = "Ranch"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = "1"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7644' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7644')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '250122-2' ORDER BY display_order ASC

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '250122-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_virtual_tours WHERE listing_key = '250122-2'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '250122-2' ORDER BY display_order ASC

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_id = 129 AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7644-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT agent_id, CONCAT(agent_first_name, ' ', agent_last_name) AS agent_name, agent_key FROM vwr1_agent_roster_master WHERE is_trash = 'No' AND agent_team_id IN ( SELECT id FROM vwr1_agent_team WHERE id = '6' AND is_active = 'Yes' AND is_trash = 'No' ) ORDER BY RAND() LIMIT 3

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7629-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_agent_roster_master AS M WHERE 1 AND agent_key = '7556-2' AND agent_active = 'Yes' AND is_trash = 'No'

SELECT agent_id,agent_email,agent_first_name,agent_last_name FROM vwr1_agent_roster_master WHERE agent_team_role = 'team-leader' AND agent_team_id='6'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '250122-2' ORDER BY display_order ASC

SELECT * FROM vwr1_mls_master WHERE 1 AND is_trash='No' AND mls_market_active = 'No' ORDER BY mls_market_title ASC

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE LM.is_trash = 'No' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.list_price_current BETWEEN 169500 AND 282500 AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'NON_MLS' AND LM.is_trash = 'No'

SELECT city, state FROM vwr1_listing_master WHERE city != '' AND is_mark_for_deletion = 'N' UNION SELECT city, state FROM vwr1_listing_master_inactive WHERE city != '' AND is_mark_for_deletion = 'N' ORDER BY city

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Adrian') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Adrian') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Albert City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Albert City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Algona') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Algona') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alpha') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alpha') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arcadia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arcadia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Armstrong') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Armstrong') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arnolds Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arnolds Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arthur') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arthur') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ashton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ashton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Auburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Auburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Aurelia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Aurelia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ayrshire') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ayrshire') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bancroft') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bancroft') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Belmond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Belmond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Blue Earth') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Blue Earth') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bode') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bode') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Boyden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Boyden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Breda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Breda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Brewster') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Brewster') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Buffalo Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Buffalo Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Burt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Burt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Calumet') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Calumet') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Carroll') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Carroll') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ceylon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ceylon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cherokee') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cherokee') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cornell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cornell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Creston') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Creston') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Crystal Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Crystal Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Curlew') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Curlew') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Currie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Currie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cylinder') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cylinder') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dakota Dunes') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dakota Dunes') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Deloit') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Deloit') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dickens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dickens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dolliver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dolliver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Eagle Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Eagle Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Early') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Early') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Emmetsburg') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Emmetsburg') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Estherville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Estherville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Everly') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Everly') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fairmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fairmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Farnhamville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Farnhamville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fenton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fenton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fonda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fonda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Forest City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Forest City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fort Dodge') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fort Dodge') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fostoria') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fostoria') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('George') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('George') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillett Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillett Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillettt Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillettt Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gilmore City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gilmore City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Graettinger') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Graettinger') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Greenville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Greenville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gruver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gruver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Harris') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Harris') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hartley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hartley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Havelock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Havelock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hawarden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hawarden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hinton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hinton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hornick') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hornick') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hull') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hull') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Humboldt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Humboldt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ida Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ida Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Jackson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Jackson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kingsley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kingsley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kiron') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kiron') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Mills') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Mills') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake View') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake View') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakefield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakefield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakeside') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakeside') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakota') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakota') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Larchwood') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Larchwood') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Laurens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Laurens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Le Mars') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Le Mars') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ledyard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ledyard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Linn Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Linn Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Little Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Little Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Livermore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Livermore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lohrville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lohrville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lone Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lone Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lu Verne') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lu Verne') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mallard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mallard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mapleton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mapleton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Marathon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Marathon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mason City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mason City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Matlock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Matlock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Maurice') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Maurice') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('May City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('May City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Melvin') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Melvin') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Meriden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Meriden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Merrill') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Merrill') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Milford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Milford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Montgomery') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Montgomery') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mountain Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mountain Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('New Richland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('New Richland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Newell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Newell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ocheyedan') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ocheyedan') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Odebolt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Odebolt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Onawa') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Onawa') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orange City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orange City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orleans') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orleans') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Paullina') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Paullina') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Peterson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Peterson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Plover') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Plover') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Pocahontas') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Pocahontas') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Primghar') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Primghar') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rembrandt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rembrandt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Remsen') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Remsen') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ringsted') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ringsted') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Valley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Valley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rolfe') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rolfe') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rossie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rossie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Round Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Round Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Royal') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Royal') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ruthven') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ruthven') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rutland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rutland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sac City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sac City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sanborn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sanborn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scarville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scarville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Schaller') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Schaller') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scranton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scranton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sergeant Bluff') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sergeant Bluff') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sheldon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sheldon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sherburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sherburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sibley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sibley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Slayton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Slayton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Superior') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Superior') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sutherland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sutherland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Swea City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Swea City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Terril') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Terril') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Thompson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Thompson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Titonka') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Titonka') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wahpeton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wahpeton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wallingford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wallingford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Washta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Washta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Webb') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Webb') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Welcome') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Welcome') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wesley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wesley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Bend') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Bend') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Westfield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Westfield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Whittemore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Whittemore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wilmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wilmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Windom') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Windom') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Woden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Woden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Worthington') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Worthington') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT title FROM vwr1_listing_fields WHERE field_name = 'city' AND is_trash='No'

SELECT city FROM vwr1_listing_meta_geo WHERE id in('3','12','18082','20','24','26','27','37','39','42') and type='city' and is_trash='No'

SELECT area, state FROM vwr1_listing_master WHERE area != '' AND is_mark_for_deletion = 'N' UNION SELECT area, state FROM vwr1_listing_master_inactive WHERE area != '' AND is_mark_for_deletion = 'N' ORDER BY area

SELECT * FROM vwr1_listing_meta_geo WHERE type = 'area' AND area_visible = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Beaver Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Beaver Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Big Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Big Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Black Hawk Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Black Hawk Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Budd Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Budd Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Center Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Center Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Clear Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Clear Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Five Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Five Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Fox Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Fox Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Hall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Hall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('High Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('High Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Honky Pond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Honky Pond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ingham Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ingham Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Iowa Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Iowa Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lake Minnewashta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lake Minnewashta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Sioux River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Sioux River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Loon Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Loon Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lost Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lost Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lower Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lower Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Mill Creek') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Mill Creek') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Minnesota Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Minnesota Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ocheyedan River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ocheyedan River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Okamenpeedan Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Okamenpeedan Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pearl Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pearl Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pleasant Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pleasant Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Rush Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Rush Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Ayrshire)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Ayrshire)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Lake Park)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Lake Park)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Upper Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Upper Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Wahpeton Canals') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Wahpeton Canals') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Harbor') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Harbor') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT title FROM vwr1_listing_fields WHERE field_name = 'area' AND is_trash='No'

SELECT area FROM vwr1_listing_meta_geo WHERE id in('25555','44','501','48','51','56','57','59','58') and type='area' and is_trash='No'

SELECT property_type FROM vwr1_listing_master WHERE property_type != '' AND is_mark_for_deletion = 'N' UNION SELECT property_type FROM vwr1_listing_master_inactive WHERE property_type != '' AND is_mark_for_deletion = 'N' ORDER BY property_type

SELECT title FROM vwr1_listing_meta_general WHERE id in('2') and type='property_type' and is_trash='No'

SELECT sub_type FROM vwr1_listing_master WHERE sub_type != '' AND is_mark_for_deletion = 'N' UNION SELECT sub_type FROM vwr1_listing_master_inactive WHERE sub_type != '' AND is_mark_for_deletion = 'N' ORDER BY sub_type

SELECT title FROM vwr1_listing_meta_general WHERE id in('276','275','286') and type='sub_type' and is_trash='No'

SELECT * FROM vwr1_mls_master WHERE mls_market_active = 'Yes' AND is_trash='No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_listing_meta_general WHERE type = 'property_type' AND is_visible = 'Yes' AND is_trash = 'No'

SELECT * FROM vwr1_listing_meta_general WHERE type = 'property_type'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340') AND LM.city IN('spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340') AND LM.city IN('spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS'

SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340') AND LM.city IN('spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master_inactive AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340') AND LM.city IN('spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' ORDER BY listing_date asc LIMIT 0, 6

SELECT MM.mlsp_id, MM.mls_disclaimer_big, MM.mls_disclaimer_short, MM.mls_disclaimer_icon, MM.last_run_datetime FROM vwr1_mls_master AS MM WHERE 1 AND MM.mls_market_active = 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "18th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230022-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230022-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230022-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230027-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230027-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230027-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230024-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230024-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230024-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230023-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230023-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230023-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230031-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230031-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230031-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230030-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230030-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230030-2' ORDER BY display_order ASC

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE LM.is_trash = 'No' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.city IN('spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'NON_MLS' AND LM.is_trash = 'No'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS'

SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master_inactive AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' ORDER BY listing_date asc LIMIT 0, 6

SELECT MM.mlsp_id, MM.mls_disclaimer_big, MM.mls_disclaimer_short, MM.mls_disclaimer_icon, MM.last_run_datetime FROM vwr1_mls_master AS MM WHERE 1 AND MM.mls_market_active = 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Commercial"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "Lake" AND city_rets = "Spirit Lake" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "" AND city_rets = "Spirit Lake" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spirit Lake" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "Dickinson" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51360" AND city_rets = "Spirit Lake" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7566' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7566')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '190001-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '190001-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '190001-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230029-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230029-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230029-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230028-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230028-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230028-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Mixed Use"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "State" AND city_rets = "Lake View" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "Black Hawk Lake" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Lake View" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Lake View" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51450" AND city_rets = "Lake View" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7575' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7575')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '211290-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '211290-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '211290-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "State" AND city_rets = "Lake View" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Lake View" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Lake View" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51450" AND city_rets = "Lake View" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7575' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7575')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '220063-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '220063-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '220063-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "358Th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7587' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7587')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221235-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221235-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221235-2' ORDER BY display_order ASC

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE LM.is_trash = 'No' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'NON_MLS' AND LM.is_trash = 'No'

SELECT * FROM vwr1_listing_meta_geo WHERE type = 'zip' AND zip_visible = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235') AND LM.zip IN('51301') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235') AND LM.zip IN('51301') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS'

SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235') AND LM.zip IN('51301') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master_inactive AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235') AND LM.zip IN('51301') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' ORDER BY listing_date asc LIMIT 0, 6

SELECT MM.mlsp_id, MM.mls_disclaimer_big, MM.mls_disclaimer_short, MM.mls_disclaimer_icon, MM.last_run_datetime FROM vwr1_mls_master AS MM WHERE 1 AND MM.mls_market_active = 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "358Th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7587' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7587')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221236-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221236-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221236-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "358Th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7587' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7587')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221237-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221237-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221237-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "358Th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7587' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7587')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221242-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221242-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221242-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "358Th" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7587' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7587')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221241-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221241-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '221241-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611','7610')

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7610' AND is_trash = 'No'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231141-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231141-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231141-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "22nd" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Spencer" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51301" AND city_rets = "Spencer" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Spencer"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7611' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7611','7610')

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7610' AND is_trash = 'No'

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231142-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231142-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '231142-2' ORDER BY display_order ASC

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE LM.is_trash = 'No' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.zip IN('51301') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'NON_MLS' AND LM.is_trash = 'No'

SELECT * FROM vwr1_listing_meta_geo WHERE type = 'street' AND street_visible = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND LM.street IN('3865-210th-avenue') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND LM.street IN('3865-210th-avenue') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS'

SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND LM.street IN('3865-210th-avenue') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master_inactive AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND LM.street IN('3865-210th-avenue') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' ORDER BY listing_date asc LIMIT 0, 6

SELECT MM.mlsp_id, MM.mls_disclaimer_big, MM.mls_disclaimer_short, MM.mls_disclaimer_icon, MM.last_run_datetime FROM vwr1_mls_master AS MM WHERE 1 AND MM.mls_market_active = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE LM.is_trash = 'No' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.street IN('3865-210th-avenue') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'NON_MLS' AND LM.is_trash = 'No'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive AS LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS'

SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION SELECT LM.*,CONCAT(LM.listing_key,'-',LM.provider_id) As ListingID_MLS,mls_is_pic_url_supported, IF(LM.office_code = '', 1, 0) AS is_office_listing,MM.mls_disclaimer_big,MM.last_run_datetime AS mls_prop_last_sync_date FROM vwr1_listing_master_inactive AS LM LEFT JOIN vwr1_mls_master AS MM ON LM.provider_id = MM.mlsp_id WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND LM.ml_num NOT IN('240340','230022','230027','230024','230023','230031','230030','190001','230029','230028','211290','220063','221235','221236','221237','221242','221241','231141','231142') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' ORDER BY listing_date asc LIMIT 0, 6

SELECT MM.mlsp_id, MM.mls_disclaimer_big, MM.mls_disclaimer_short, MM.mls_disclaimer_icon, MM.last_run_datetime FROM vwr1_mls_master AS MM WHERE 1 AND MM.mls_market_active = 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Commercial"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "Okoboji" AND city_rets = "Milford" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Milford" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Milford" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51351" AND city_rets = "Milford" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = "Okoboji"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7656' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7656')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230566-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230566-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '230566-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Recreational"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "340th" AND city_rets = "Ruthven" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "" AND city_rets = "Ruthven" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Ruthven" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51358" AND city_rets = "Ruthven" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7650' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7650')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240018-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240018-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240018-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Commercial"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "P" AND city_rets = "Milford" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Milford" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Milford" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51351" AND city_rets = "Milford" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7586' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7586')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240163-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240163-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240163-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "365th" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Estherville" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51334" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7551' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7551')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240230-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240230-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240230-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "365th" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Estherville" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51334" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7551' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7551')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240231-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240231-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240231-2' ORDER BY display_order ASC

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'status' AND meta_rets = "Active"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'property_type' AND meta_rets = "LAND"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'sub_type' AND meta_rets = "Residential"

SELECT street FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'street' AND street_rets = "365th" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT area FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'area' AND area_rets = "" AND state_rets = "IA"

SELECT subdivision FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'subdivision' AND subdivision_rets = "IA" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT city FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'city' AND city_rets = "Estherville" AND state_rets = "IA"

SELECT county FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'county' AND county_rets = "" AND state_rets = "IA"

SELECT state FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'state' AND state_rets = "IA"

SELECT zip FROM vwr1_listing_meta_geo WHERE is_trash = 'No' AND type = 'zip' AND zip_rets = "51334" AND city_rets = "Estherville" AND state_rets = "IA"

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'garage_type' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'style' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'basement' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'stories' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'school' AND meta_rets = ""

SELECT title FROM vwr1_listing_meta_general WHERE is_trash = 'No' AND type = 'waterfront_description' AND meta_rets = ""

SELECT agent_sef_url FROM vwr1_agent_roster_master WHERE agent_code = '7551' AND is_trash = 'No'

SELECT ar.agent_id, um.user_first_name, um.user_last_name, um.user_email, um.user_mobile, um.user_work_phone, um.user_address, um.user_zipcode, um.user_city, um.user_state, um.user_county, um.user_ref_id AS agent_code, cm.company_title,cm.company_office_phone, ( SELECT ofm.office_key FROM vwr1_listing_office_master AS ofm WHERE ofm.office_code = cm.company_ref_id AND ofm.is_mark_for_deletion = 'N' LIMIT 1) AS office_key FROM vwr1_person_master AS um LEFT JOIN vwr1_company_master AS cm ON um.user_company_id = cm.company_id LEFT JOIN vwr1_agent_roster_master AS ar ON um.user_ref_id = ar.agent_code WHERE um.user_id IN ( SELECT user_id FROM vwr1_contact_type_master WHERE user_contact_type = 'master') AND um.user_added_by_id = -2 AND um.user_added_by_type = 'Rets Sync' AND um.user_ref_id in('7551')

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240233-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240233-2' ORDER BY is_primary DESC, display_order ASC LIMIT 0, 1

SELECT * FROM vwr1_listing_photos WHERE is_trash = 'No' AND listing_key = '240233-2' ORDER BY display_order ASC

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE LM.is_trash = 'No' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (FIND_IN_SET('Land', LM.property_type)) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'NON_MLS' AND LM.is_trash = 'No'

SELECT * FROM vwr1_listing_meta_general WHERE type = 'state'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.street IN('210th-avenue') AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.street IN('210th-avenue') AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.zip IN('51301') AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.zip IN('51301') AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT * FROM vwr1_listing_meta_general WHERE type = 'style'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('spencer') AND LM.state IN('IA') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT DISTINCT(LG.id),LG.* FROM vwr1_listing_meta_geo AS LG INNER JOIN vwr1_listing_master AS LM ON FIND_IN_SET(LM.city, REPLACE(LG.city_rets,'|',',')) WHERE LG.type = 'city' AND LG.city_visible = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.status IN('Active','Active Contingent') AND FIND_IN_SET('Spencer', REPLACE(LG.city_rets,'|',',')) > 0 AND LG.city_visible = 'Yes' AND FIND_IN_SET('IA', REPLACE(LG.state_rets,'|',',')) > 0 AND LG.state_visible = 'Yes' ORDER BY LG.city

SELECT * FROM vwr1_community_master WHERE 1 AND cmty_visible = 'Yes' AND is_trash = 'No' AND cmty_ref_name = 'spencer~ia'

SELECT DISTINCT property_type , COUNT(*) AS cnt FROM vwr1_listing_master WHERE property_type != '' AND is_mark_for_deletion = 'N' AND category ='sale' AND city ='Spencer' AND state='IA' AND city='Spencer' GROUP by property_type HAVING cnt > 0 ORDER BY property_type

SELECT DISTINCT sub_type , COUNT(*) AS cnt FROM vwr1_listing_master WHERE sub_type != '' AND is_mark_for_deletion = 'N' AND category ='sale' AND city ='Spencer' AND state='IA' AND city='Spencer' GROUP by sub_type HAVING cnt > 0 ORDER BY sub_type

SELECT DISTINCT bed_total , COUNT(*) AS cnt FROM vwr1_listing_master WHERE bed_total != '' AND is_mark_for_deletion = 'N' AND category ='sale' AND city ='Spencer' AND state='IA' AND city='Spencer' GROUP by bed_total HAVING cnt > 0 ORDER BY bed_total

SELECT * FROM vwr1_listing_meta_general WHERE type = 'category'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 10000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 10000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 100000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 100000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 200000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 200000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 300000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 300000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 400000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 400000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 500000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 500000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 600000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 600000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 700000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 700000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 800000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 800000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 900000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 900000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 1000000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('sale') AND LM.list_price_current >= 1000000 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT city, state FROM vwr1_listing_master WHERE city != '' AND is_mark_for_deletion = 'N' UNION SELECT city, state FROM vwr1_listing_master_inactive WHERE city != '' AND is_mark_for_deletion = 'N' ORDER BY city

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Adrian') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Adrian') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Albert City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Albert City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Algona') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Algona') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alpha') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alpha') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Alton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arcadia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arcadia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Armstrong') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Armstrong') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arnolds Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arnolds Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arthur') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Arthur') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ashton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ashton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Auburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Auburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Aurelia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Aurelia') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ayrshire') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ayrshire') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bancroft') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bancroft') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Belmond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Belmond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Blue Earth') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Blue Earth') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bode') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Bode') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Boyden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Boyden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Breda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Breda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Brewster') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Brewster') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Buffalo Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Buffalo Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Burt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Burt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Calumet') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Calumet') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Carroll') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Carroll') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ceylon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ceylon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cherokee') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cherokee') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cornell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cornell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Creston') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Creston') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Crystal Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Crystal Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Curlew') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Curlew') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Currie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Currie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cylinder') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Cylinder') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dakota Dunes') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dakota Dunes') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Deloit') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Deloit') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dickens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dickens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dolliver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Dolliver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Eagle Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Eagle Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Early') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Early') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Emmetsburg') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Emmetsburg') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Estherville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Estherville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Everly') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Everly') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fairmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fairmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Farnhamville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Farnhamville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fenton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fenton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fonda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fonda') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Forest City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Forest City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fort Dodge') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fort Dodge') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fostoria') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Fostoria') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('George') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('George') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillett Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillett Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillettt Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gillettt Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gilmore City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gilmore City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Graettinger') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Graettinger') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Greenville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Greenville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gruver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Gruver') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Harris') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Harris') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hartley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hartley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Havelock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Havelock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hawarden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hawarden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hinton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hinton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hornick') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hornick') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hull') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Hull') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Humboldt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Humboldt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ida Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ida Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Jackson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Jackson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kingsley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kingsley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kiron') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Kiron') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Mills') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Mills') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake Park') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake View') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lake View') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakefield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakefield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakeside') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakeside') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakota') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lakota') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Larchwood') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Larchwood') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Laurens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Laurens') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Le Mars') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Le Mars') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ledyard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ledyard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Linn Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Linn Grove') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Little Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Little Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Livermore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Livermore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lohrville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lohrville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lone Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lone Rock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lu Verne') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Lu Verne') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mallard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mallard') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Manson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mapleton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mapleton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Marathon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Marathon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mason City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mason City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Matlock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Matlock') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Maurice') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Maurice') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('May City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('May City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Melvin') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Melvin') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Meriden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Meriden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Merrill') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Merrill') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Milford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Milford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Montgomery') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Montgomery') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mountain Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Mountain Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('New Richland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('New Richland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Newell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Newell') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ocheyedan') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ocheyedan') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Odebolt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Odebolt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Onawa') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Onawa') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orange City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orange City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orleans') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Orleans') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Paullina') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Paullina') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Peterson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Peterson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Plover') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Plover') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Pocahontas') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Pocahontas') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Primghar') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Primghar') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rembrandt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rembrandt') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Remsen') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Remsen') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ringsted') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ringsted') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Valley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rock Valley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rolfe') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rolfe') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rossie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rossie') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Round Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Round Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Royal') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Royal') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ruthven') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Ruthven') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rutland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Rutland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sac City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sac City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sanborn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sanborn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scarville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scarville') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Schaller') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Schaller') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scranton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Scranton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sergeant Bluff') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sergeant Bluff') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sheldon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sheldon') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sherburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sherburn') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sibley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sibley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Center') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sioux Rapids') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Slayton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Slayton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Superior') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Superior') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sutherland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Sutherland') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Swea City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Swea City') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Terril') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Terril') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Thompson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Thompson') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Titonka') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Titonka') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wahpeton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wahpeton') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wallingford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wallingford') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Washta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Washta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Webb') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Webb') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Welcome') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Welcome') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wesley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wesley') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Bend') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Bend') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('West Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Westfield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Westfield') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Whittemore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Whittemore') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wilmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Wilmont') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Windom') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Windom') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Woden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Woden') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Worthington') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Worthington') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT title FROM vwr1_listing_fields WHERE field_name = 'city' AND is_trash='No'

SELECT city FROM vwr1_listing_meta_geo WHERE id in('3','12','18082','20','24','26','27','37','39','42') and type='city' and is_trash='No'

SELECT area, state FROM vwr1_listing_master WHERE area != '' AND is_mark_for_deletion = 'N' UNION SELECT area, state FROM vwr1_listing_master_inactive WHERE area != '' AND is_mark_for_deletion = 'N' ORDER BY area

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Beaver Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Beaver Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Big Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Big Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Black Hawk Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Black Hawk Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Budd Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Budd Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Center Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Center Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Clear Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Clear Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Des Moines River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('East Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Five Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Five Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Fox Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Fox Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Hall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Hall Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('High Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('High Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Honky Pond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Honky Pond') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ingham Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ingham Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Iowa Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Iowa Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lake Minnewashta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lake Minnewashta') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Sioux River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Sioux River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Little Spirit Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Loon Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Loon Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lost Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lost Island Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lower Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Lower Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Mill Creek') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Mill Creek') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Minnesota Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Minnesota Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ocheyedan River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Ocheyedan River') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Okamenpeedan Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Okamenpeedan Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pearl Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pearl Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pleasant Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Pleasant Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Rush Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Rush Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Ayrshire)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Ayrshire)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Lake Park)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Silver Lake (Lake Park)') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Storm Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Tuttle Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Upper Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Upper Gar Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Wahpeton Canals') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('Wahpeton Canals') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Harbor') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Harbor') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.area IN('West Okoboji Lake') AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT title FROM vwr1_listing_fields WHERE field_name = 'area' AND is_trash='No'

SELECT area FROM vwr1_listing_meta_geo WHERE id in('25555','44','501','48','51','56','57','59','58') and type='area' and is_trash='No'

SELECT property_type FROM vwr1_listing_master WHERE property_type != '' AND is_mark_for_deletion = 'N' UNION SELECT property_type FROM vwr1_listing_master_inactive WHERE property_type != '' AND is_mark_for_deletion = 'N' ORDER BY property_type

SELECT title FROM vwr1_listing_meta_general WHERE id in('2') and type='property_type' and is_trash='No'

SELECT sub_type FROM vwr1_listing_master WHERE sub_type != '' AND is_mark_for_deletion = 'N' UNION SELECT sub_type FROM vwr1_listing_master_inactive WHERE sub_type != '' AND is_mark_for_deletion = 'N' ORDER BY sub_type

SELECT title FROM vwr1_listing_meta_general WHERE id in('276','275','286') and type='sub_type' and is_trash='No'

SELECT * FROM vwr1_mls_master WHERE mls_market_active = 'Yes' AND is_trash='No'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT * FROM vwr1_page_master WHERE page_site_id = '70' AND page_content LIKE '%[[AgentProfile]]%'

SELECT DISTINCT property_type , COUNT(*) AS cnt FROM vwr1_listing_master WHERE property_type != '' AND is_mark_for_deletion = 'N' AND category ='Sale' AND city ='Spencer' AND state='IA' AND city='Spencer' GROUP by property_type HAVING cnt > 0 ORDER BY property_type

SELECT title FROM vwr1_listing_meta_general WHERE type = 'property_type' AND meta_rets = 'COMMERCIAL' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'property_type' AND meta_rets = 'LAND' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'property_type' AND meta_rets = 'MULTIFAMILY' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'property_type' AND meta_rets = 'RESIDENTIAL' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT DISTINCT sub_type , COUNT(*) AS cnt FROM vwr1_listing_master WHERE sub_type != '' AND is_mark_for_deletion = 'N' AND category ='Sale' AND city ='Spencer' AND state='IA' AND city='Spencer' GROUP by sub_type HAVING cnt > 0 ORDER BY sub_type

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Business Opportunity' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Commercial' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Condominium' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Duplex' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Mixed Use' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Mobile Home' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Quadruplex' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Recreational' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Residential' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Single Family Residence' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT title FROM vwr1_listing_meta_general WHERE type = 'sub_type' AND meta_rets = 'Townhouse' AND title != '' AND is_trash='No' AND is_visible = 'Yes' AND is_trash != 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 1 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 1 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 2 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 2 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 3 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 3 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 4 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 4 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 5 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 5 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 6 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 6 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 7 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 7 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 8 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 8 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 9 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 9 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 10 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND LM.city IN('Spencer') AND LM.state IN('IA') AND LM.category IN('Sale') AND LM.bed_total BETWEEN 1 AND 10 AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_community_area AS CA LEFT JOIN vwr1_community_master AS C ON CA.area_ref_id = C.cmty_id LEFT JOIN vwr1_agent_roster_master AS AG ON CA.added_by_id = AG.agent_id AND area_added_by_type = 'Agent' LEFT JOIN vwr1_community_area_category AS CT ON CA.area_cat_id = CT.areacat_id WHERE 1 AND C.is_trash = 'No' AND CA.is_trash = 'No' AND AG.is_trash = 'No' AND AG.agent_active = 'Yes' AND ( (C.cmty_type ='city' AND C.cmty_title = 'Spencer') ) AND area_visible = 'Yes' AND cmty_visible = 'Yes' AND area_display_on_site_id = 70 AND CA.added_by_id = 129

SELECT CA.*, C.cmty_id, AG.agent_id FROM vwr1_community_area AS CA LEFT JOIN vwr1_community_master AS C ON CA.area_ref_id = C.cmty_id LEFT JOIN vwr1_agent_roster_master AS AG ON CA.added_by_id = AG.agent_id AND area_added_by_type = 'Agent' LEFT JOIN vwr1_community_area_category AS CT ON CA.area_cat_id = CT.areacat_id WHERE 1 AND C.is_trash = 'No' AND CA.is_trash = 'No' AND AG.is_trash = 'No' AND AG.agent_active = 'Yes' AND ( (C.cmty_type ='city' AND C.cmty_title = 'Spencer') ) AND area_visible = 'Yes' AND cmty_visible = 'Yes' AND area_display_on_site_id = 70 AND CA.added_by_id = 129 ORDER BY RAND(), updated_at DESC LIMIT 3

SELECT CA.*, C.cmty_id, AG.agent_id FROM vwr1_community_area AS CA LEFT JOIN vwr1_community_master AS C ON CA.area_ref_id = C.cmty_id LEFT JOIN vwr1_agent_roster_master AS AG ON CA.added_by_id = AG.agent_id AND area_added_by_type = 'Agent' WHERE 1 AND C.is_trash = 'No' AND C.cmty_visible = 'Yes' AND CA.is_trash = 'No' AND AG.is_trash = 'No' AND AG.agent_active = 'Yes' AND CA.added_by_id = 129 AND CA.area_display_on_site_id = 70 ORDER BY RAND(), updated_at DESC LIMIT 0, 3

SELECT DISTINCT areacat_id, areacat_title FROM vwr1_community_area_category AS CT LEFT JOIN vwr1_community_area AS CA ON CA.area_cat_id = CT.areacat_id LEFT JOIN vwr1_community_master AS C ON CA.area_ref_id = C.cmty_id WHERE 1 AND CT.is_trash = 'No' AND ( (C.cmty_type ='city' AND C.cmty_title = 'Spencer') ) AND area_visible = 'Yes' AND cmty_visible = 'Yes' AND area_display_on_site_id = 70 ORDER BY areacat_title ASC RE/MAX Lakes Realty presents this property located at 3865 210th Avenue, Spencer, IA 51301. MLS # 240340 with a price of $226,000.

51301, IA Spencer, 3865 210th Avenue

51301 IA properties for sale in Spencer with MLS # 240340

$226,000

  • N/A
  • N/A
  • 561924
  • Expired
Expired

General Description

Situated just 3 miles from town, this 13-acre parcel at the end of a dead-end road offers an idyllic setting for your dream home. Enjoy views of pastures and a winding stream. Utilities are ready with a rural water pit and power estimate, plus fiber optics in progress.

Legal: 13 ACRE TRACT IN NE SE
Status: Expired

Property Information

240340

$226,000

Sale

Residential

LAND

3865 210th Avenue

Spencer

IA

51301

561924

0.00

1240

2022

Utilities

No

LISTED BY

EXIT Realty Midwest, Tracey Radcliffe (712.330.0837)

PROPERTY LOCATION

MORTGAGE CALCULATOR


Similar listings

$275,000

Status: Active
216 34th Avenue, Spencer, IA 51301

  221338

 3

 2

  1,533


Listed by : EXIT REALTY MIDWEST- SPENCER/EMMETSBURG, CRISTY JONES (712.260.0423)

$275,000

Status: Active
212 34th Avenue, Spencer, IA 51301

  221339

 3

 2

  1,533


Listed by : EXIT REALTY MIDWEST- SPENCER/EMMETSBURG, CRISTY JONES (712.260.0423)

$275,000

Status: Active
208 34th Avenue, Spencer, IA 51301

  221340

 3

 2

  1,533


Listed by : EXIT REALTY MIDWEST- SPENCER/EMMETSBURG, CRISTY JONES (712.260.0423)

$275,000

Status: Active
204 34th Avenue, Spencer, IA 51301

  221341

 3

 2

  1,533


Listed by : EXIT REALTY MIDWEST- SPENCER/EMMETSBURG, CRISTY JONES (712.260.0423)

$229,900

Status: Active
209 34th Avenue, Spencer, IA 51301

  231318

 2

 1

  1,133


Listed by : EXIT REALTY MIDWEST- SPENCER/EMMETSBURG, CRISTY JONES (712.260.0423)
Built in 2023

$179,900

Status: Active
422 11Th Avenue, Spencer, IA 51301

  250122

 3

 1

  1,107


Listed by : EXIT REALTY MIDWEST- SPENCER/EMMETSBURG, NICOLE NIMKE (712.363.0287)
Price Decreased

Ask About this Property #240340



SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_openhouse = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_openhouse = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_newconstruction = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_newconstruction = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_shortsale = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_shortsale = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_newlisting = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_newlisting = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_price_increased = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_price_increased = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_price_decreased = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_price_decreased = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_reo = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_reo = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_hud = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_hud = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

SELECT COUNT(*) AS cnt FROM vwr1_listing_master as LM WHERE 1 AND LM.is_display_on_web = 'Yes' AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_foreclosure = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' UNION ALL SELECT COUNT(*) AS cnt FROM vwr1_listing_master_inactive as LM WHERE 1 AND LM.is_mark_for_deletion = 'N' AND LM.is_display_listing = 'Y' AND (((LM.is_foreclosure = 'Yes'))) AND (status IN('Active','New') OR status IN('active-contingent') OR status IN('new')) AND LM.listing_type = 'MLS' AND LM.is_display_on_web = 'Yes'

Share


NEWSLETTER