I also have been needing to do this with SQL.
Currently I am returning a bunch of jason-type data.
i.e the following example from the SQL row/colum quantity by size:
a:5:{s:2:”XS”;s:1:”0″;s:1:”S”;s:1:”1″;s:1:”M”;s:1:”1″;s:1:”L”;s:1:”0″;s:2:”XL”;s:1:”0″;}
Not sure how to decipher this either. I am writing a plugin to export order and product data. I am down to my final query, which happens to require getting quantity per size per item.
Any thoughts?