Skip to content
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

Some contact duplicates in 'contact_info_one_row_per_stu_contact_pair' CTE in the contacts query #6

Open
mryoho opened this issue Jul 4, 2018 · 2 comments
Labels

Comments

@mryoho
Copy link
Contributor

mryoho commented Jul 4, 2018

Selecting the following in the contacts query yields duplicate results for several contacts. In most cases, on one line there is an address and then there are nulls for the address on the next line.

In WA, contact_ids 337, 724, 1209, 1662, 497, 157, 170, 899, 1029, 2186 have this problem.

SELECT DISTINCT
  local_student_id,
  contact_id,
  con.first_name,
  con.last_name,
  email_address,
  cell_phone_number,
  contact_type,
  physical_address_line_1,
  physical_address_line_2,
  physical_address_city,
  physical_address_state,
  physical_address_zip,
  mailing_address_line_1,
  mailing_address_line_2,
  mailing_address_city,
  mailing_address_state,
  mailing_address_zip
  home_phone_number,
  work_phone_number,
  is_legal,
  emergency_contact



FROM public.students stud

  LEFT JOIN contact_info_one_row_per_stu_contact_pair AS con USING(student_id)

ORDER BY contact_id;
@mpalmisano
Copy link
Contributor

Is this only when you SELECT contact_id or just generally? @mryoho

@mryoho
Copy link
Contributor Author

mryoho commented Jul 9, 2018

It happens regardless when selecting in long form. This is something we should track down and fix, but I don't think that it needs to be done right this instant. I was trying to document this as an improvement.

@mryoho mryoho added the bug label Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants