Question: 6천 이하 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 6000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 빈집 구해줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
ORDER BY SI.REGIST_DT DESC


Question: 농가주택 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (BM.REAL_PURPS LIKE '%농가주택%' OR SI.SLS_TTL LIKE '%농가주택%')
ORDER BY SI.REGIST_DT DESC


Question: 제주도 지역 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '제주특별자치도'
ORDER BY SI.REGIST_DT DESC


Question: 청도군 월세

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '청도군'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 고성군 월세 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '고성군'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 다세대주택 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (BM.REAL_PURPS LIKE '%다세대주택%' OR SI.SLS_TTL LIKE '%다세대주택%')
ORDER BY SI.REGIST_DT DESC


Question: 상주시 1억 이하 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '상주시'
  AND SI.DEAL_PRICE <= 10000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 밀양시 5천만원 이하 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '밀양시'
  AND SI.DEAL_PRICE <= 5000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 사천시 전원주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '사천시'
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.REGIST_DT DESC


Question: 영동군 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영동군'
ORDER BY SI.REGIST_DT DESC


Question: 안동시 2억 이하

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '안동시'
  AND SI.DEAL_PRICE <= 20000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 고성군 빈집 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '고성군'
ORDER BY SI.REGIST_DT DESC


Question: 청도군 월세 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '청도군'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 거제시 1억 이하 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '거제시'
  AND SI.DEAL_PRICE <= 10000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 7천 아래 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 7000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 경북 경주시 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '경상북도'
  AND PB.AS2 = '경주시'
ORDER BY SI.REGIST_DT DESC


Question: 강원도 지역 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '강원특별자치도'
ORDER BY SI.REGIST_DT DESC


Question: 거제시 전원주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '거제시'
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.REGIST_DT DESC


Question: 여수시 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '여수시'
ORDER BY SI.REGIST_DT DESC


Question: 옥천군 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '옥천군'
ORDER BY SI.REGIST_DT DESC


Question: 영암군 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영암군'
ORDER BY SI.REGIST_DT DESC


Question: 창원시 5천만원 이하

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '창원시'
  AND SI.DEAL_PRICE <= 5000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 철원군 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '철원군'
ORDER BY SI.REGIST_DT DESC


Question: 임대용 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_TP IN ('2', '3', '4')
ORDER BY SI.REGIST_DT DESC


Question: 소수면 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (PB.AS3 LIKE '%소수면%' OR PB.AS4 LIKE '%소수면%' OR PB.NAME LIKE '%소수면%' OR PB.NAME2 LIKE '%소수면%')
ORDER BY SI.REGIST_DT DESC


Question: 단독주택 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (BM.REAL_PURPS LIKE '%단독주택%' OR SI.SLS_TTL LIKE '%단독주택%')
ORDER BY SI.REGIST_DT DESC


Question: 정읍시 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '정읍시'
ORDER BY SI.REGIST_DT DESC


Question: 영양군 월세

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영양군'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 인천시 지역 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '인천광역시'
ORDER BY SI.REGIST_DT DESC


Question: 빈집 3개

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
ORDER BY SI.REGIST_DT DESC
FETCH FIRST 3 ROWS ONLY


Question: 제주 빈집 몇 개?

SELECT COUNT(*) AS "건 수"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '제주특별자치도'


Question: 빈집 뭐있어

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
ORDER BY SI.REGIST_DT DESC


Question: 다세대주택 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (BM.REAL_PURPS LIKE '%다세대주택%' OR SI.SLS_TTL LIKE '%다세대주택%')
ORDER BY SI.REGIST_DT DESC


Question: 3천만원 이상 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE >= 3000
ORDER BY SI.DEAL_PRICE ASC


Question: 통영시 전세

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '통영시'
  AND SI.DEAL_TP = '2'
ORDER BY SI.REGIST_DT DESC


Question: 대구시 빈집 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '대구광역시'
ORDER BY SI.REGIST_DT DESC


Question: 충남에 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '충청남도'
ORDER BY SI.REGIST_DT DESC


Question: 수도권 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 IN ('서울특별시', '경기도', '인천광역시')
ORDER BY SI.REGIST_DT DESC


Question: 통영시 매물 개수

SELECT COUNT(*) AS "건 수"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '통영시'


Question: 7천만원 이하 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 7000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 밀양시 전원주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '밀양시'
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.REGIST_DT DESC


Question: 군산시 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '군산시'
ORDER BY SI.REGIST_DT DESC


Question: 3천 미만 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 3000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 5천 이상 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE >= 5000
ORDER BY SI.DEAL_PRICE ASC


Question: 밀양시 빈집 몇 개?

SELECT COUNT(*) AS "건 수"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '밀양시'


Question: 강원도 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '강원특별자치도'
ORDER BY SI.REGIST_DT DESC


Question: 제주도 매물 보여줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '제주특별자치도'
ORDER BY SI.REGIST_DT DESC


Question: 충주시 전원주택 5천만원 이하

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '충주시'
  AND SI.DEAL_PRICE <= 5000
  AND SI.DEAL_PRICE > 0
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.DEAL_PRICE ASC


Question: 문경시 월세

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '문경시'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 영덕군 5천만원 이하

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영덕군'
  AND SI.DEAL_PRICE <= 5000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 영천시 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영천시'
ORDER BY SI.REGIST_DT DESC


Question: 김해시 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '김해시'
ORDER BY SI.REGIST_DT DESC


Question: 인천 빈집 몇 개?

SELECT COUNT(*) AS "건 수"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '인천광역시'


Question: 월 임대 가능한 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 산청군 매매

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '산청군'
  AND SI.DEAL_TP = '1'
ORDER BY SI.REGIST_DT DESC


Question: 부산시 지역 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '부산광역시'
ORDER BY SI.REGIST_DT DESC


Question: 신안군 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '신안군'
ORDER BY SI.REGIST_DT DESC


Question: 양산시 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '양산시'
ORDER BY SI.REGIST_DT DESC


Question: 영덕군 월세 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영덕군'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 1천 미만 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 1000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 서울시 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '서울특별시'
ORDER BY SI.REGIST_DT DESC


Question: 최근 일주일

SELECT
    SI.SLS_ID,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    SI.SLS_TTL,
    SI.DEAL_PRICE,
    BM.ETC_ADDR,
    SI.REGIST_DT
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.REGIST_DT >= SYSDATE - 7
ORDER BY SI.REGIST_DT DESC


Question: 청송군 전세

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '청송군'
  AND SI.DEAL_TP = '2'
ORDER BY SI.REGIST_DT DESC


Question: 평택시 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '평택시'
ORDER BY SI.REGIST_DT DESC


Question: 3천만원에서 5천만원 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE BETWEEN 3000 AND 5000
ORDER BY SI.DEAL_PRICE ASC


Question: 최근 빈집 5개

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
ORDER BY SI.REGIST_DT DESC
FETCH FIRST 5 ROWS ONLY


Question: 봉화군 몇 채?

SELECT COUNT(*) AS "건 수"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '봉화군'


Question: 5억 미만 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 50000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 거창군 평균 가격

SELECT
    COUNT(*) AS "총 건수",
    ROUND(AVG(SI.DEAL_PRICE)) AS "평균 가격",
    MIN(SI.DEAL_PRICE) AS "최저 가격",
    MAX(SI.DEAL_PRICE) AS "최고 가격"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE > 0
  AND PB.AS2 = '거창군'


Question: 저가 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 3000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 나주시 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '나주시'
ORDER BY SI.REGIST_DT DESC


Question: 충남 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '충청남도'
ORDER BY SI.REGIST_DT DESC


Question: 양구군 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '양구군'
ORDER BY SI.REGIST_DT DESC


Question: 8천 이하 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 8000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 거창 빈집 좀 보여줘봐

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '거창군'
ORDER BY SI.REGIST_DT DESC


Question: 빈집 목록

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
ORDER BY SI.REGIST_DT DESC


Question: 고성군 다가구주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '고성군'
  AND (BM.REAL_PURPS LIKE '%다가구주택%' OR SI.SLS_TTL LIKE '%다가구주택%')
ORDER BY SI.REGIST_DT DESC


Question: 삼방면 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (PB.AS3 LIKE '%삼방면%' OR PB.AS4 LIKE '%삼방면%' OR PB.NAME LIKE '%삼방면%' OR PB.NAME2 LIKE '%삼방면%')
ORDER BY SI.REGIST_DT DESC


Question: 월세 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 창녕군 전원주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '창녕군'
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.REGIST_DT DESC


Question: 청송군 1억 이하

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '청송군'
  AND SI.DEAL_PRICE <= 10000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 봉화군 전원주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '봉화군'
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.REGIST_DT DESC


Question: 전원 주택 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.REGIST_DT DESC


Question: 경기 빈집 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '경기도'
ORDER BY SI.REGIST_DT DESC


Question: 진주시 매물 개수

SELECT COUNT(*) AS "건 수"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '진주시'


Question: 빈집 있어?

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
ORDER BY SI.REGIST_DT DESC


Question: 고창군 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '고창군'
ORDER BY SI.REGIST_DT DESC


Question: 사천시 전세 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '사천시'
  AND SI.DEAL_TP = '2'
ORDER BY SI.REGIST_DT DESC


Question: 논산시 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '논산시'
ORDER BY SI.REGIST_DT DESC


Question: 부여군 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '부여군'
ORDER BY SI.REGIST_DT DESC


Question: 살 수 있는 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_TP = '1'
ORDER BY SI.REGIST_DT DESC


Question: 의령군 농가주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '의령군'
  AND (BM.REAL_PURPS LIKE '%농가주택%' OR SI.SLS_TTL LIKE '%농가주택%')
ORDER BY SI.REGIST_DT DESC


Question: 9천만원 미만 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE <= 9000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 성산면 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (PB.AS3 LIKE '%성산면%' OR PB.AS4 LIKE '%성산면%' OR PB.NAME LIKE '%성산면%' OR PB.NAME2 LIKE '%성산면%')
ORDER BY SI.REGIST_DT DESC


Question: 최신 등록 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
ORDER BY SI.REGIST_DT DESC


Question: 경북 예천군 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '경상북도'
  AND PB.AS2 = '예천군'
ORDER BY SI.REGIST_DT DESC


Question: 강릉시 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '강릉시'
ORDER BY SI.REGIST_DT DESC


Question: 다세대주택 있어?

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (BM.REAL_PURPS LIKE '%다세대주택%' OR SI.SLS_TTL LIKE '%다세대주택%')
ORDER BY SI.REGIST_DT DESC


Question: 월 임대로 나온 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_TP = '3'
ORDER BY SI.REGIST_DT DESC


Question: 순천시 이번 달 매물

SELECT
    SI.SLS_ID,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    SI.SLS_TTL,
    SI.DEAL_PRICE,
    BM.ETC_ADDR,
    SI.REGIST_DT
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '순천시'
  AND SI.REGIST_DT >= TRUNC(SYSDATE, 'MM')
ORDER BY SI.REGIST_DT DESC


Question: 토지 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (BM.REAL_PURPS LIKE '%토지%' OR SI.SLS_TTL LIKE '%토지%')
ORDER BY SI.REGIST_DT DESC


Question: 양구군 빈집 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '양구군'
ORDER BY SI.REGIST_DT DESC


Question: 와룡면 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (PB.AS3 LIKE '%와룡면%' OR PB.AS4 LIKE '%와룡면%' OR PB.NAME LIKE '%와룡면%' OR PB.NAME2 LIKE '%와룡면%')
ORDER BY SI.REGIST_DT DESC


Question: 고령군 빈집 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '고령군'
ORDER BY SI.REGIST_DT DESC


Question: 영주시 최근 3개월 매물

SELECT
    SI.SLS_ID,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    SI.SLS_TTL,
    SI.DEAL_PRICE,
    BM.ETC_ADDR,
    SI.REGIST_DT
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영주시'
  AND SI.REGIST_DT >= ADD_MONTHS(SYSDATE, -3)
ORDER BY SI.REGIST_DT DESC


Question: 안동시 전원주택 1억 이하

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '안동시'
  AND SI.DEAL_PRICE <= 10000
  AND SI.DEAL_PRICE > 0
  AND (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.DEAL_PRICE ASC


Question: 사천시 매매

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '사천시'
  AND SI.DEAL_TP = '1'
ORDER BY SI.REGIST_DT DESC


Question: 홍천군 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '홍천군'
ORDER BY SI.REGIST_DT DESC


Question: 청송군 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '청송군'
ORDER BY SI.REGIST_DT DESC


Question: 무안군 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '무안군'
ORDER BY SI.REGIST_DT DESC


Question: 3천만원에서 5천만원 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE BETWEEN 3000 AND 5000
ORDER BY SI.DEAL_PRICE ASC


Question: 영주시 다가구주택

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영주시'
  AND (BM.REAL_PURPS LIKE '%다가구주택%' OR SI.SLS_TTL LIKE '%다가구주택%')
ORDER BY SI.REGIST_DT DESC


Question: 5천만원~1억원 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_PRICE BETWEEN 5000 AND 10000
ORDER BY SI.DEAL_PRICE ASC


Question: 전라남도 지역 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '전라남도'
ORDER BY SI.REGIST_DT DESC


Question: 충청권 매물 검색

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 IN ('대전광역시', '세종특별자치시', '충청북도', '충청남도')
ORDER BY SI.REGIST_DT DESC


Question: 의령군 빈집 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '의령군'
ORDER BY SI.REGIST_DT DESC


Question: 세종시 지역 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '세종특별자치시'
ORDER BY SI.REGIST_DT DESC


Question: 경북 문경시 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '경상북도'
  AND PB.AS2 = '문경시'
ORDER BY SI.REGIST_DT DESC


Question: 전세금 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_TP = '2'
ORDER BY SI.REGIST_DT DESC


Question: 안동시 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '안동시'
ORDER BY SI.REGIST_DT DESC


Question: 광주 매물 보여줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS1 = '광주광역시'
ORDER BY SI.REGIST_DT DESC


Question: 사려는 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND SI.DEAL_TP = '1'
ORDER BY SI.REGIST_DT DESC


Question: 위천면 빈집

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND (PB.AS3 LIKE '%위천면%' OR PB.AS4 LIKE '%위천면%' OR PB.NAME LIKE '%위천면%' OR PB.NAME2 LIKE '%위천면%')
ORDER BY SI.REGIST_DT DESC


Question: 순천시 최근 3개월 매물

SELECT
    SI.SLS_ID,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    SI.SLS_TTL,
    SI.DEAL_PRICE,
    BM.ETC_ADDR,
    SI.REGIST_DT
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '순천시'
  AND SI.REGIST_DT >= ADD_MONTHS(SYSDATE, -3)
ORDER BY SI.REGIST_DT DESC


Question: 영암군 빈집 매물

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '영암군'
ORDER BY SI.REGIST_DT DESC


Question: 양평군 빈집 찾아줘

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '양평군'
ORDER BY SI.REGIST_DT DESC


Question: 사천시 전세

SELECT
    SI.SLS_ID,
    SI.SLS_TTL,
    SI.DEAL_TP,
    CASE SI.DEAL_TP
      WHEN '1' THEN '매매'
      WHEN '2' THEN '전세'
      WHEN '3' THEN '월세'
      WHEN '4' THEN '년세'
    END AS DEAL_TP_NM,
    SI.DEAL_PRICE,
    SI.REGIST_DT,
    SI.SOLD_YN,
    BM.ETC_ADDR,
    BM.TOT_AREA,
    BM.PLAT_AREA,
    BM.PRIV_AREA,
    BM.USEAPR_DT,
    BM.GRND_FLR_CNT,
    BM.UGRND_FLR_CNT,
    BM.X,
    BM.Y,
    PB.AS1 AS SIDO,
    PB.AS2 AS SIGUNGU,
    PB.AS3 AS EMD,
    PB.AS4 AS RI
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '사천시'
  AND SI.DEAL_TP = '2'
ORDER BY SI.REGIST_DT DESC