Skip to content

Instantly share code, notes, and snippets.

@ayee
Created May 26, 2015 21:23
Show Gist options
  • Save ayee/b02f2066d9b3c750acb3 to your computer and use it in GitHub Desktop.
Save ayee/b02f2066d9b3c750acb3 to your computer and use it in GitHub Desktop.
Query to pull a dataset of first-hit visits (visit_number=1) with only variables that have been shown with significant influence
select paidlengthofstay, sitecatalyst_narrow.* from customer_sample_null_plos_fix join reservation using (accountorderitemid) join sitecatalyst_narrow on reservation.reservationitemid = sitecatalyst_narrow.purchase_id_int and sitecatalyst_narrow.visit_number = 1 and purchase_id_int is not NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment