id candid jobid status date
1 11 11j Introduced 20/04/2014
2 11 11j Interviewed 22/04/2014
3 12 11j Introduced 22/04/2014
4 13 11j Introduced 22/04/2014
5 12 11j Interviewd 24/04/2014
6 12 11j Rejected 24/04/2014
i want to count introduced candidates only which r not interviewd..
i.e. In above table i have 3 introduced candidates, but 2 of them are interviewd that means i need only one introduces candidate having candid = 13
I need the sql query to count only introduce candidates which are not interviewd, rejected..
Please anybody help me with this...
I am wating for reply..
Please..
I am Having table like this:
id candid candname status date time location jobcode
1 12 hhhhhhhhhh Introduce 2014-05-21 14:0 NewYork 10JN
3 12 hhh Reject 2014-05-21 15:0 AM London 10JN
4 12 hhhhhhhhhh Interview 2014-05-21 15:0 PM Chicago 10JN
5 11 Pinky Bare Introduce 2014-05-21 65:6 India 10JN
6 11 Pinky Bare Interview 2014-05-21 4:56 AM 10JN
7 13 chetan Tae Introduce 2014-05-21 4:54 AM Nagpur faOl
8 13 chetan Tae Interview 2014-05-21 3:45 Pune faOl
9 14 manisha mane Introduce 2014-05-21 3:33 PM Pune faOl
10 18 ranju gondane Introduce 2014-05-28 3:44 Nagpur AQW-06
12 18 ranju gondane Interview 2014-05-28 5:45 45454 AQW-06
13 18 ranju gondane Reject 2014-05-28 43:43 rsds AQW-06
14 19 vandanna rai Introduce 2014-05-28 7:7 yyyr AQW-06
if i use query
SELECT COUNT(*) FROM [tablename] WHERE (jobcode='AQW-06') AND ([status] <> 'Interview' AND [status] <> 'Reject' AND [status] <> 'ON-Hold' AND [status] <> 'Hire')
I get count 2 for introduce candidates..
if the candidate is interviewd after introduce, it will not counted as Introduce..