Question: 사천시 월세 매물

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


Question: 2억원까지 빈집

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


Question: 영덕군 5천만원 이하 빈집

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


Question: 영양군 다가구주택

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


Question: 2천 미만 빈집

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


Question: 동해시 빈집 매물

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


Question: 1억~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 BETWEEN 10000 AND 20000
ORDER BY SI.DEAL_PRICE ASC


Question: 창녕군 빈집 수

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


Question: 무주군 빈집 매물

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


Question: 하동군 5천만원 이하 빈집

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


Question: 의성군 월세 매물

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


Question: 밀양시 월세 매물

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


Question: 태안군 빈집 찾아줘

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


Question: 100평 이상 빈집

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

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


Question: 고령군 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.AS1 = '경상남도'
  AND PB.AS2 = '남해군'
ORDER BY SI.REGIST_DT DESC


Question: 거창군 월세 매물

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


Question: 1억5천만원까지 빈집

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


Question: 남해군 매매 매물

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


Question: 완도군 매물

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


Question: 저렴하게 살 수 있는 집

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


Question: 남원시 단독주택 1억 이하

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


Question: 고성군 매물 개수

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


Question: 용궁면 빈집

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


Question: 전세로 빈집

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


Question: 하동군 월세 매물

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


Question: 경기도 빈집 찾아줘

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


Question: 전세금 빈집

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


Question: 서울시 매물 보여줘

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


Question: 넓은 빈집

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


Question: 제주도 빈집 찾아줘

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


Question: 거제시 빈집 매물

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


Question: 농가 주택 빈집

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


Question: 의령군 전원주택 1억 이하

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


Question: 강릉시 매물

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

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


Question: 울산에 빈집

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


Question: 봉화군 빈집 몇 개?

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


Question: 충남 빈집

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


Question: 임실군 빈집

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


Question: 고성군 5천만원 이하 빈집

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


Question: 2천 이상 빈집

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


Question: 강원 매물

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


Question: 인천에 빈집

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


Question: 산청군 매매 매물

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


Question: 고양시 빈집

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


Question: 함양군 매물

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


Question: 2천 넘는 빈집

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


Question: 울진군 매매 매물

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


Question: 삼척시 빈집 찾아줘

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


Question: 고령군 전세

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


Question: 서울에 빈집

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


Question: 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: 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'
  AND SI.DEAL_PRICE <= 100000
  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 = '1'
ORDER BY SI.REGIST_DT DESC


Question: 상주시 전세 매물

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

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


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 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 <= 2000
  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: 인천 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 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.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: 빈집 상위 30개

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


Question: 6천만원 아래 매물

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


Question: 전라남도 평균 가격

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


Question: 봉화군 매매 매물

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


Question: 매물 좀 찾아줘

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


Question: 광양시 빈집

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


Question: 세종 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.AS1 = '세종특별자치시'
  AND SI.DEAL_PRICE <= 10000
  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 = '세종특별자치시'
ORDER BY SI.REGIST_DT DESC


Question: 영주시 전세 1억 이하

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


Question: 6천만원 이하 빈집

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


Question: 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: 청송군 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: 공주시 전세 5천만원 이하

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


Question: 화성시 빈집

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


Question: 경남 함양군 빈집

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


Question: 경북 의성군 빈집

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


Question: 임실군 빈집 매물

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


Question: 울산시 빈집

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


Question: 사천시 5천만원 이하 빈집

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


Question: 요즘 빈집

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

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


Question: 구매로 나온 매물

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


Question: 의령군 월세

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