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: 충주시 단독주택 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 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 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 = '진주시'
  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 = '예산군'
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'
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_TP = '1'
  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 = '나주시'
ORDER BY SI.REGIST_DT DESC


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


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: 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
    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: 충주시 전세 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_TP = '2'
  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 (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.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 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 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
  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 (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 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 = '경상북도'
  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: 영덕군 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 PB.AS2 = '영덕군'
  AND SI.DEAL_PRICE <= 3000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


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 <= 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 = '장수군'
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'
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 (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 = '함양군'
  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.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: 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 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.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 = '통영시'
  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 (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'
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 = '경상남도'
  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 (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.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
    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천만원 이하

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 (BM.REAL_PURPS LIKE '%전원주택%' OR SI.SLS_TTL LIKE '%전원주택%')
ORDER BY SI.REGIST_DT DESC


Question: 최근 빈집 50개

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 50 ROWS ONLY


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 BM.TOT_AREA DESC NULLS LAST


Question: 1억에서 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 10000 AND 50000
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.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: 진주시 빈집 매물

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 = '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.AS2 = '창원시'
  AND (BM.REAL_PURPS LIKE '%단독주택%' OR SI.SLS_TTL LIKE '%단독주택%')
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'
  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 = '영양군'
  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 = '금산군'
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 SI.DEAL_PRICE <= 2000
  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 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.AS1 = '부산광역시'
ORDER BY SI.REGIST_DT DESC


Question: 4천만원 이하 매물

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 <= 4000
  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'
  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: 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
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.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: 영덕군 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 = '수원시'
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: 빈집 상위 100개

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 100 ROWS ONLY


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 = '전북특별자치도'
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 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.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'
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 SI.DEAL_PRICE <= 2000
  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,
    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: 문경시 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 PB.AS2 = '문경시'
  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 = '밀양시'
  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.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 = '상주시'
  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 = '영주시'
  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: 철원군 빈집 매물

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: 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 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 = '양산시'
  AND SI.DEAL_TP = '1'
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: 청도군 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 PB.AS2 = '청도군'
  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 = '통영시'
  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
    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.AS1 = '충청북도'


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: 50평 이상 매물

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.TOT_AREA >= 165
ORDER BY BM.TOT_AREA DESC NULLS LAST


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.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: 1억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 <= 15000
  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 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 = '의령군'