I have following table:
UserId UserDb Systolic Diastolic Weight Height
----------- ----------- ----------- ----------- ----------- -----------
1000022 2 0 0 0 67
1000022 2 23 323 33 0
50508 30 3 3 33 39
51604 0 0 44 44 191
51318 0 0 0 0 0
How I can get UserId's with complete set of records? I mean that data can be scattered between records, like user with 1000022 id have height record in one row, and weight, systolic and diastolic in other rows.
I have the solution with table variables but it isn't efficient and flexible. Is it possible to make such kind of query?
I would like to get that ID's:
UserId
-----------
1000022
50508