SELECT LEFT(deweyClass, 1), year(cin), month(cin), count(*)
from spl_2016.inraw 
where year(cin) >= '2018' AND year(cin) <= '2021' 
GROUP BY year(cin), month(cin), LEFT(deweyClass, 1)
ORDER BY year(cin), month(cin), count(*);


/* SELECT LEFT(deweyClass, 1), count(*)
from spl_2016.inraw 
where year(cin) >= '2020' AND year(cin) <= '2021' 
group by LEFT(deweyClass,1) order by count(*) DESC; */


/* SELECT DISTINCT deweyClass, count(*)
from spl_2016.inraw 
where year(cin) >= '2020' AND year(cin) <= '2021'
group by deweyClass order by count(*) DESC; */


/* SELECT LEFT(deweyClass, 1), year(cin), count(*)
from spl_2016.inraw 
where year(cin) >= '2018' AND year(cin) <= '2021' 
GROUP BY year(cin), LEFT(deweyClass, 1)
ORDER BY year(cin), count(*);
*/


