Skip to content
Advertisement

Combine two large multi-JOIN and GROUP BY queries

So I have one query that is performing one GROUP BY that requires a lot of joining to get it to perform aggregation of a row count basically

Then there is a similarly structured query but performing a different aggregation on a row count.

How would you nest the second query into the first query so that the final columns would be something like ServerName, ComponentCount, InterfaceCount ?

it seems like I’m missing something simple here but maybe not, maybe this is way beyond my capabilities.

Advertisement

Answer

I do not recommend this type of query, it is better to optimize it. Anyway, one of the methods of making the final result is as follows

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement