Relative Content

Tag Archive for sqlsnowflake-cloud-data-platformwindow-functions

Snowflake SQL | How to sum over distinct values in one pass?

I am working with survey response data, where a user could have taken the survey multiple times. Users have a “weight” assigned to them, which is an integer. I am trying to calculate the sum of user_weight by city, making sure I don’t double count the user_weight for users who have taken the survey multiple times.

Snowflake SQL | How to sum over distinct values in one pass?

I am working with survey response data, where a user could have taken the survey multiple times. Users have a “weight” assigned to them, which is an integer. I am trying to calculate the sum of user_weight by city, making sure I don’t double count the user_weight for users who have taken the survey multiple times.

Snowflake window function | how to sum over distinct values in one pass

I am working with survey response data, where a user could have taken the survey multiple times. Users have a “weight” assigned to them, which is an integer. I am trying to calculate the sum of user_weight by city, making sure I don’t double count the user_weight for users who have taken the survey multiple times.