Hi all,
Need some experts help.
Just sharing my query with small example.
I have two data for different countries, data A with 5 different countries and data B with 3 countries.
The volume is both table will refresh for each country. I would want to select random samples of 30. But it should be proportional to ratio in tableA from data A and table B from data B
That is if in table A country India is having 100 as count and table B india is having 200 , then my 30 random samples should be 10 data A and 20 from data B.
Kindly assist.
So, you need to either union the table and stratify the sample or create your ratio and use that to sample the data.
Create the ratio:
Sample. There are many ways to do this. This is a quick brute force.
@rpilaniya3
Can you share some dataset, so we can also work with a sample flow?
User | Count |
---|---|
63 | |
28 | |
23 | |
23 | |
22 |