Skip to content

kNN 에서 join 관련 질문입니다. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
theeluwin opened this issue Feb 2, 2020 · 0 comments
Open

kNN 에서 join 관련 질문입니다. #2

theeluwin opened this issue Feb 2, 2020 · 0 comments

Comments

@theeluwin
Copy link

3.5 거의 맨 아랫부분에서, 중간결과물들을 합쳐서 최종 테이블을 만드는 부분인데요

from (
    -- 앞에서 구한 occurence 에, 인접 세션에 대한 아이템을 붙여준다. (이게 결국 추천이 되어야하는 아이템)
    select
        a.neighbor_session_id,
        a.target_session_id,
        a.target_uid,
        a.neighbor_score,
        b.item_id
    from session_neighbor_occurence a
    inner join session_item_view b on a.neighbor_session_id = b.session_id
)a
left outer join session_item_view b on a.target_session_id = b.session_id and a.item_id = b.item_id
inner join knn_idf c on a.item_id = c.item_id
group by a.target_uid, a.target_session_id, a.item_id

여기서 아래 한 줄에 해당 하는 부분은 쓰이지 않는것 같습니다.

left outer join session_item_view b on a.target_session_id = b.session_id and a.item_id = b.item_id

실제로도 빼고 실행시켜도 결과가 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant