MySQL Forums
Forum List  »  General

Re: GROUP BY and NULL values
Posted by: Mason Sklut
Date: June 11, 2020 08:54AM

Sorry if it was confusing. Hopefully this should clear things up. The 'fiddle' link represents how our ecommerce platforms stores order data. I'm using this query to extract customer order information with an ODBC connector for Excel. We need to have each item a customer orders on a separate row. So if Order ID #1 has two items of different colors, those would go on separate rows. Of course if it was a single color with 1 or more quantities then it would remain on one row. The trouble with the query is when the 'style' attribute comes into the picture. If a customer order a vintage red shirt and a regular red shirt, 'vintage' and 'regular' would be the styles. So those would be output to two rows. Does that help?

Options: ReplyQuote

Written By
June 10, 2020 12:50PM
Re: GROUP BY and NULL values
June 11, 2020 08:54AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.