Attention all SQL gods! Query help needed.
- by gurun8
I need a little help putting together a SQL query that will give me the following resultsets:
and
The data model looks like this:
The tricky part for me is that the columns to the right of the "Product" in the resultset are really columns in the database but rather key/value pairs spanned across the data model.
Table data is as follows:
My apologies in advance for the image heavy question and the image quality. This just seemed like the easiest way to convey the information. It'll probably take someone less time to write the query statement to achieve the results.
By the way, the "product_option" table image is truncated but it illustrated the general idea of the data structure.
The MySQL server version is 5.1.45.