Click here to Skip to main content
15,904,024 members
Home / Discussions / Database
   

Database

 
GeneralRe: ERROR_MESSAGE() & SQL2005 Pin
Graham_424-Oct-07 23:02
Graham_424-Oct-07 23:02 
QuestionCount problem Pin
Nishad8524-Oct-07 18:31
Nishad8524-Oct-07 18:31 
Hi
I have a table named StudentResult

UserID School Semester Grade Campus Status

1 School1 Summer 10 Campus1 Accepted
2 School1 Summer 10 Campus1 Accepted
3 School1 Summer 10 Campus1 Rejected
4 School1 Summer 10 Campus1 Rejected
5 School1 FALL 10 Campus1 Accepted
6 School1 Summer 12 Campus1 Accepted
7 School1 Summer 12 Campus1 Rejected
8 School1 Summer 12 Campus1 Accepted
9 School1 Summer 12 Campus1 Rejected
10 School1 Summer 12 Campus1 Accepted
11 School1 FALL 12 Campus1 Rejected
12 School1 FALL 12 Campus1 Accepted
13 School1 FALL 11 Campus1 Rejected
14 School1 FALL 11 Campus1 Accepted
15 School1 FALL 11 Campus1 Accepted
16 School1 Summer 11 Campus1 Rejected
17 School1 Summer 11 Campus1 Accepted
18 School1 Summer 11 Campus1 Accepted


I want to take the number of accepted and rejected users from the above table as the result table below.I want to consider grade,Campus and semester for taking count and the result should be like result table.Please help me to write Query for this.
I am using SQL server2000. as database


School Semester Grade Campus NoofAccepted NoofRejected

School1 Summer 10 Campus1 2 2
School1 Fall 10 Campus1 1 0
School1 Summer 11 Campus1 2 1
School1 Fall 11 Campus1 2 1
School1 Summer 12 Campus1 3 2
School1 Fall 12 Campus1 1 1

Thanx








AnswerRe: Count problem Pin
_Damian S_24-Oct-07 20:24
professional_Damian S_24-Oct-07 20:24 
Questionhow to know other users are connecting to my sql database Pin
skyleo_200824-Oct-07 17:06
skyleo_200824-Oct-07 17:06 
AnswerRe: how to know other users are connecting to my sql database Pin
N a v a n e e t h24-Oct-07 20:36
N a v a n e e t h24-Oct-07 20:36 
GeneralRe: how to know other users are connecting to my sql database Pin
skyleo_200824-Oct-07 22:04
skyleo_200824-Oct-07 22:04 
GeneralRe: how to know other users are connecting to my sql database Pin
N a v a n e e t h24-Oct-07 22:54
N a v a n e e t h24-Oct-07 22:54 
AnswerRe: how to know other users are connecting to my sql database Pin
John-ph25-Oct-07 3:08
John-ph25-Oct-07 3:08 
GeneralRe: how to know other users are connecting to my sql database Pin
skyleo_200825-Oct-07 15:01
skyleo_200825-Oct-07 15:01 
QuestionHow to create SQL function Pin
Yulianto.24-Oct-07 16:25
Yulianto.24-Oct-07 16:25 
AnswerRe: How to create SQL function Pin
Tirthadip24-Oct-07 21:04
Tirthadip24-Oct-07 21:04 
QuestionNewbie: round control buttons Pin
lee_hatcher24-Oct-07 14:48
lee_hatcher24-Oct-07 14:48 
AnswerRe: Newbie: round control buttons Pin
Paddy Boyd25-Oct-07 4:06
Paddy Boyd25-Oct-07 4:06 
GeneralRe: Newbie: round control buttons Pin
lee_hatcher25-Oct-07 5:06
lee_hatcher25-Oct-07 5:06 
GeneralRe: Newbie: round control buttons Pin
Paddy Boyd25-Oct-07 5:30
Paddy Boyd25-Oct-07 5:30 
GeneralRe: Newbie: round control buttons Pin
lee_hatcher25-Oct-07 5:39
lee_hatcher25-Oct-07 5:39 
QuestionDTSX and file locations Pin
CurtOlive24-Oct-07 12:06
CurtOlive24-Oct-07 12:06 
QuestionRun SQL query in A2T Application Pin
wellpoint24-Oct-07 9:01
wellpoint24-Oct-07 9:01 
AnswerRe: Run SQL query in A2T Application Pin
Dave Kreskowiak24-Oct-07 9:38
mveDave Kreskowiak24-Oct-07 9:38 
QuestionInstalling SQL 2008 VHDs Pin
Mark J. Miller24-Oct-07 3:29
Mark J. Miller24-Oct-07 3:29 
AnswerRe: Installing SQL 2008 VHDs Pin
Mike Dimmick24-Oct-07 4:15
Mike Dimmick24-Oct-07 4:15 
GeneralRe: Installing SQL 2008 VHDs Pin
Mark J. Miller24-Oct-07 4:36
Mark J. Miller24-Oct-07 4:36 
AnswerRe: Installing SQL 2008 VHDs Pin
TJoe24-Oct-07 5:17
TJoe24-Oct-07 5:17 
GeneralRe: Installing SQL 2008 VHDs Pin
Mike Dimmick25-Oct-07 5:16
Mike Dimmick25-Oct-07 5:16 
QuestionRestoring backups between SQL Server 2005 Editions Pin
Mridang Agarwalla24-Oct-07 1:50
Mridang Agarwalla24-Oct-07 1:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.