Author: Rohit Umarjikar
Posted: Tue Feb 14, 2017 11:11 am (GMT 5.5)
It certainly makes no sense to have two queries at first place. The sum will remain same as you are getting it from tableb, the only thing that will change is the total population. Query 2 may have less population because you added tabled to filter.
Instead of stating the problem this way , you can tell is the requirement given to you and expect us to opinion and answer and in that way you could get multiple answers or solutions.
If you still wants to persue this then you could add a union between these teo queries and add a outer select and a case to get 3 columns.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."![icon_razz.gif]()
Posted: Tue Feb 14, 2017 11:11 am (GMT 5.5)
It certainly makes no sense to have two queries at first place. The sum will remain same as you are getting it from tableb, the only thing that will change is the total population. Query 2 may have less population because you added tabled to filter.
Instead of stating the problem this way , you can tell is the requirement given to you and expect us to opinion and answer and in that way you could get multiple answers or solutions.
If you still wants to persue this then you could add a union between these teo queries and add a outer select and a case to get 3 columns.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
