月度学生违约者名单

时间:2013-12-16 09:21:20

标签: sql-server

表名:学生

Stu_id  Stu_Name    
1       ani 
2       sudipta 
3       debayan 
4       achinto 
5       dipankar

表名:trans

stu_id   mon    amount
1        JANU   500
1        FEB    600
1        APR    500
3       JANU    600
3        MAR    700

结果将低于

STU_ID    STU_NAME   Defaulter month
1         ani           MAR,MAY,JUNE,JULY,AUG,SEP,OCT,NOV,DEC
2         SUDIPTA       JANU.FEB,MAR,APR,MAY,JUNE,JULY,AUG,SEP,OCT,NOV,DEC
3         debayan       FEB,APR,MAY,JUNE,JULY,AUG,SEP,OCT,NOV,DEC
4         achinto       JANU.FEB,MAR,APR,MAY,JUNE,JULY,AUG,SEP,OCT,NOV,DEC
5         dipankar      JANU.FEB,MAR,APR,MAY,JUNE,JULY,AUG,SEP,OCT,NOV,DEC

0 个答案:

没有答案