How can we use group by within separate categories? That is treat each category as it's own group and then group by something else within the category.
For instance in this Image, I would like to group by quarter only within a particular ISSN.
CodePudding user response:
It is possible to group by more than one column:
select issn, quarter, count(*)
from t
group by issn, quarter
CodePudding user response:
Simply add columns -as prioritized- to group by, example:
SELECT * FROM MyTable GROUP BY ISSN, Quarter