This is my data set:
QTR MONTHS SALES
Q1 JAN 100
Q1 FEB 200
Q2 MAY 300
Q2 JUN 400
I want an output like this;
Row Labels JAN FEB MAY JUN Grand Total
Q1 100 200 300
Q2 300 400 700
Grand Total 100 200 300 400 1000
How do I write an SQL query in R to do this?