Apply sql query to a table output by a node

Hello all,

I want to be able to treat a node output like a table and run sql against it . I understand for the most part the nodes do all the sql stuff needed but there are some instances where they don't or it's not that simple at least.

The reason I need this is that I have a count column and I want to get max(count) based on only two columns but if I do that I loose all the other columns using a GroupBy node. I'm thinking I need a nested query for it.

Thanks,

 

Amrit Grewal