I work for writing reporting with SQL. But unfortunately, queries are very complicated. I analyzed this issue like following:
- There is a VIEW and some columns to show customers
- There are some columns have many conditional clauses (ex. if...else...)
- These conditional clauses depends on JOINed tables
- As a result, the VIEW has eight or more quadrants
EDIT1(Work in progress)
Model of source data side (not reporting).
Is there any good way to expel logics from SQL ? Any another solutions are welcome.