Question: 고창군 빈집 찾아줘

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


Question: 인천 빈집

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


Question: 양평군 빈집 매물

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


Question: 해남군 빈집 찾아줘

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


Question: 해남군 매물

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


Question: 장흥군 빈집 찾아줘

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


Question: 진안군 빈집 찾아줘

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


Question: 거창군 월세

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


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


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 = '양구군'
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: 합천군 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: 영양군 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: 2억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 <= 25000
  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.AS1 = '경상북도'
  AND PB.AS2 = '고령군'
ORDER BY SI.REGIST_DT DESC


Question: 최신 매물 10개

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 10 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 = '문경시'
  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
    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 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 = '함양군'
  AND (BM.REAL_PURPS LIKE '%다가구주택%' OR SI.SLS_TTL LIKE '%다가구주택%')
ORDER BY SI.REGIST_DT DESC


Question: 8천까지 빈집

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


Question: 경주시 빈집 매물

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


Question: 하동군 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: 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 = '광주광역시'
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 <= 10000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


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.AS2 = '창원시'
  AND (BM.REAL_PURPS LIKE '%다가구주택%' OR SI.SLS_TTL LIKE '%다가구주택%')
ORDER BY SI.REGIST_DT DESC


Question: 울진군 빈집 찾아줘

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


Question: 창녕군 3천만원 이하

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


Question: 거제시 매물

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


Question: 부안군 빈집

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


Question: 3천~5천 매물

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


Question: 근린생활시설 있어?

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


Question: 서울시 빈집

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


Question: 영주시 월세

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


Question: 5천 안쪽으로

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


Question: 영주시 단독주택 5천만원 이하

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


Question: 7천만원까지 빈집

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


Question: 고령군 전세 매물

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


Question: 대구 빈집 매물

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


Question: 양구군 매물

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


Question: 사천시 빈집 수

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: 5천만원 이상 빈집

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


Question: 영주시 이번 달 매물

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


Question: 고성군 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: 서울 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.AS1 = '서울특별시'
  AND SI.DEAL_PRICE <= 5000
  AND SI.DEAL_PRICE > 0
ORDER BY SI.DEAL_PRICE ASC


Question: 여수시 빈집 매물

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


Question: 화양면 매물

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


Question: 경북 빈집 몇 개?

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


Question: 의령군 매매 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 = '1'
  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 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: 영주시 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 = '고성군'
  AND SI.DEAL_TP = '3'
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.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 = '서울특별시'
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 = '4'
ORDER BY SI.REGIST_DT DESC


Question: 창원시 월세

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


Question: 5억원 이하 빈집

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


Question: 경북 경산시 매물

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


Question: 구매 빈집

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


Question: 경북 영덕군 빈집

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


Question: 호남권 빈집

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


Question: 3억원 미만 빈집

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


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: 3천 이상 빈집

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


Question: 여주시 빈집

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


Question: 주말주택

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


Question: 세종시 빈집 찾아줘

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


Question: 김제시 빈집

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


Question: 고성군 매물

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


Question: 합천군 전세

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


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 = '경상북도'
  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 BM.TOT_AREA DESC NULLS LAST


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 (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 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 "건 수"
FROM BIS_WEB.SLS_INFO SI
INNER JOIN BIS_WEB.BIS_MASTER_NOTICE BM ON SI.BIS_MASTER_SEQ = BM.SEQ
INNER JOIN PUBLICS.BJDHIST PB ON BM.SREG = PB.REG AND BM.SEUB = PB.EUB
WHERE SI.INFO_AGREE_YN = 'Y'
  AND SI.SOLD_YN = 'N'
  AND SI.DEL_YN = 'N'
  AND PB.AS2 = '거창군'


Question: 안동시 전세 5천만원 이하

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


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: 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.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 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 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 = '경상북도'
  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
    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 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'
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 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.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