MySQL Forums
Forum List  »  General

Re: SELECT statement with multiple WHERE conditions
Posted by: Peter Brawley
Date: September 03, 2016 07:10PM

> we are unfortunately stuck with this approach and have to deal with it somehow.

You've no input into the design, but you must write complex queries for what should be simple sql tasks. Sticking anybody with such a waste of time advertises incompetence. I suppose sending that feedback up the chain puts your job at risk. Just out of curiosity, is this in the private or public sector?

If you are indeed stuck with it, you're going to need to get up to speed with pivot tables, that is with combining aggregation with Case expressions to turn EAV rows into query result columns, eg see ...

http://stackoverflow.com/questions/21836757/join-pivot-items-with-eav-table

and "Pivot tables" at http://www.artfulsoftware.com/infotree/mysqltips.php

Options: ReplyQuote


Subject
Written By
Posted
Re: SELECT statement with multiple WHERE conditions
September 03, 2016 07:10PM


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.