sciprimary=1 should be a JOIN condition, not WHERE