I have a product table as follows where a product can have 3 different packsize and prices:
id | packsize1 | price1 | packsize2 | price2 | packsize3 | price3
-------------------------------------------------------------------------------
1 | 1g | 10.00 | 5g | 25.00 | 10g | 50.00
2 | 1g | 12.00 | 5g | 27.00 | 10g | 55.00
3 | 5g | 30.00 | 10g | 40.00 | 50g | 60.00
4 | 2g | 20.00 | 5g | 35.00 | 50g | 60.00
5 | 1g | 10.00 | 5g | 35.00 | 10g | 60.00
how can I return a list of products with packsizes and prices for only 1g, 5g and 10g quantites as follows:
id | packsize1 | price1 | packsize2 | price2 | packsize3 | price3
-------------------------------------------------------------------------------
1 | 1g | 10.00 | 5g | 25.00 | 10g | 50.00
2 | 1g | 12.00 | 5g | 27.00 | 10g | 55.00
3 | 1g | null | 5g | 30.00 | 10g | 40.00
4 | 1g | null | 5g | 35.00 | 10g | null
5 | 1g | 10.00 | 5g | 35.00 | 10g | 60.00