I have data on table test like this
customer_no | name | chance
---------------------------
00000000001 | AAAA | 3
00000000002 | BBBB | 2
00000000003 | CCCC | 1
Now,i want to select from table test with multiple output that calculate by value of field chance
output like this
customer_no | name
------------------
00000000001 | AAAA
00000000001 | AAAA
00000000001 | AAAA
00000000002 | BBBB
00000000002 | BBBB
00000000003 | CCCC
how to select command in pgsql database?