create table studentdetails (
stdid int,
name varchar(30),
Enrollmentno int,
Dateofjoining date
);
create table studentstipend (
stdid int,
project varchar(30),
stipend int
);
insert into studentdetails (stdid, name, Enrollmentno, Dateofjoining)
values ('11','nick', '123456789','2019/01/02');
insert into studentdetails (stdid, name, Enrollmentno, Dateofjoining)
values ('21','yash', '456789123','2025/09/05');
insert into studentdetails (stdid, name, Enrollmentno, Dateofjoining)
values ('31','gyan', '741852963','2096/10/08');
insert into studentstipend(stdid, project, stipend)
values ('11', 'p1', '80000');
insert into studentstipend(stdid, project, stipend)
values ('21', 'p2', '10000');
insert into studentstipend(stdid, project, stipend)
values ('31', 'p1', '120000');
select project, count(stdid) as studprojcount
from studentstipend
group by project
order by studprojcount desc;