묻고답하기

SQL 쿼리는 작성을 했는데, 이걸 XML 쿼리로 바꾸려니 어떻게 해야할지 모르겠네요.

select doc.module_srl, doc.module_srl, doc.category_srl, doc.title, doc.nick_name, ex_v1.value, ex_v2.value
from cam_documents doc
inner join cam_document_extra_vars ex_v1 on doc.document_srl = ex_v1.document_srl
inner join cam_document_extra_vars ex_v2 on ex_v1.document_srl = ex_v2.document_srl
WHERE ex_v1.var_idx = 6 and ex_v1.value > ka and ex_v1.value < ja and
      ex_v2.var_idx = 7 and ex_v2.value > da and ex_v2.value < ia
GROUP BY ex_v1.document_srl

아래처럼 해 봤는데, 동작을 안 합니다. XML 쿼리에 아직 익숙치 않아서, 조금만 복잡해져도 잘 모르겠네요. 사실 SQL도 익숙치 않아서 위의 쿼리가 최선인지는 모르겠습니다. 원하는 결과는 나오는데...

<query id="getPinnedPlaces" action="select">
    <tables>
     <table>
      <table name="documents" alias="doc" />
     </table>
        <table name="document_extra_vars" alias="ex_v1" type="inner join">
            <conditions>
                <condition operation="equal" column="ex_v1.document_srl" default="doc.document_srl" />
            </conditions>
        </table>
        <table name="document_extra_vars" alias="ex_v2" type="inner join">
            <conditions>
                <condition operation="equal" column="ex_v2.document_srl" default="ex_v1.document_srl" />
            </conditions>
        </table>
        <conditions>
            <condition operation="equal" column="ex_v1.var_idx" default="6" />
            <condition operation="excess" column="ex_v1.var_idx" var="ka" notnull="notnull" pipe="and" />
            <condition operation="below" column="ex_v1.var_idx" var="ja" notnull="notnull" pipe="and" />
            <condition operation="equal" column="ex_v2.var_idx" default="7" pipe="and" />
            <condition operation="excess" column="ex_v2.var_idx" var="da" notnull="notnull" pipe="and" />
            <condition operation="below" column="ex_v2.var_idx" var="ia" notnull="notnull" pipe="and" />
        </conditions>
        <groups>
   <group column="GroupBy ex_v1.document_srl" />
  </groups>
    </tables>
 <columns>
  <column name="doc.module_srl" alias="module_srl" />
  <column name="doc.member_srl" alias="member_srl" />
  <column name="doc.category_srl" alias="category_srl" />
  <column name="doc.title" alias="title" />
  <column name="doc.nick_name" alias="nick_name" />
  <column name="ex_v1.value" alias="lat" />
  <column name="ex_v2.value" alias="lng" />
 </columns>
</query>
 

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
키미즈 CORE 업그레이드와관련하여 궁금한게 있습니다 [4] 2019.02.07 by sejin7940
세걸 접속통계치 오차 [1] file 2019.02.07 by sejin7940
세걸 메뉴가 사라짐 [2] 2019.02.07 by 세걸
날제비 홈페이지 수정 관련 문의 드립니다. [1] 2019.02.07 by DoorWeb
우유 갑자기 문장들이 밀렸(?)어요! [3] file 2019.02.07 by DoorWeb
프리맨 index.php?mid=xxxxx 소스 편집 [7] file 2019.02.07 by LuisK
pspsps 설정된 번호 입력하고 다음페이지로 넘어가는것 질문입니다 file  
엠씨오리 Warning: fread() [function.fread]: Length parameter must be greater than 0 질문드립니다. [3] 2019.02.07 by 엠씨오리
코딩펀 <ul> <li> 태그가 안 먹힙니다! [1] 2019.02.06 by sejin7940
우유 tab 소스를 활용하는 방법을 알고 싶습니다.  
종합예술인 닉네임을 바꾸면 원래 썼던 글에는 적용 안되나요? [2] 2019.02.05 by 종합예술인
키미즈 PHP버전이 안맞는다네요 [3] file 2019.02.04 by sejin7940
11673e3 마켓플레이스!! 중고장터 관련해서 문의합니다~ [8] 2019.02.04 by 마이산
바크 포인트점수를 특정날짜 이후부터 보여주고 싶습니다. [1] 2019.02.03 by sejin7940
정글범 그누보드5(아미나빌더) VS XE 글내용검색노출  
별빛 관리자 페이지 문서에서 프로필사진 설정 [2] file 2019.02.03 by 별빛
마늘 확장변수로 정렬 및 검색시 너무느려요  
마늘 정렬에 따라서 게시판 속도가 다른게 정상인가요? [2] 2019.02.03 by 마늘
billy 팝업2개와 이미지 슬라이드 충돌 [1] file 2019.02.02 by DoorWeb
chorok 레이아웃 쇼핑몰 [1] 2019.02.02 by sejin7940