Skip to content

Instantly share code, notes, and snippets.

@chribsen
Created April 4, 2016 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chribsen/36e46606c658761c9c9a638d0afd5cbc to your computer and use it in GitHub Desktop.
Save chribsen/36e46606c658761c9c9a638d0afd5cbc to your computer and use it in GitHub Desktop.
Creates the feature same_camp_score.
-- Creates the feature same camp score by looking in the table tmp_user_camp, that consists of the most frequent visited camp site.
update derived_friend_features set same_camp_score=FALSE;
update derived_friend_features AS fr set same_camp_score = TRUE
where (select title FROM tmp_user_camp WHERE user_id = fr.user_a limit 1) = (select title FROM tmp_user_camp WHERE user_id = fr.user_b limit 1)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment