Forum Moderators: open
I have a table of products (id, products, group_id) like:
1, product a, 1
2, product b, 1
3, product c, 1
4, product d, 1
5, product e, 2
6, product f, 2
7, product g, 2
8, product h, 3
9, product i, 3
10, product j, 3
11, product k, 3
12, product l, 3
13, product m, 4
14, product n, 4
15, product o, 4
16, product p, 4
and want to be able to select one random product from each group. I know how to do a random record, and I know how to do a group by. I just cant figure out the combo.
A result would be like:
product a, product g, product j, product m
TIA!