(select regmonth ,count(studentid) as totalstud ,
count(coursename)as totalcourse from tbl_studentcoursereg group by regmonth ) as tbl1
In case of derived table, we have to give the alias name to the derived table as tbl1 is the alias for the above mention derived table.