mardi 22 août 2017

select a percentage of rows

I have a table where is over 50 000 rows, from that table I want to select random percentages of rows.

Below are member types that are stored in one column(Member Type) and I need to select random percentage of each of the 7 member type. Also the percentages are not from the total number of rows but only random 8000 from that table.

○ Private Associate - 40% from random 8000 rows ○ Associate Member Under 35 - 21% from random 8000 rows ○ Private Full Member - 13% from random 8000 rows ○ Public Associate - 12% from random 8000 rows ○ Associate Student - 8% from random 8000 rows ○ Public Full Member - 3% from random 8000 rows ○ Full Member U35 - 1% from random 8000 rows

What would be the best solution for this?




Aucun commentaire:

Enregistrer un commentaire