Home » SQL & PL/SQL » SQL & PL/SQL » Query to get Status of Students as 'Pass' or 'Fail' Using Date Condition (Oracle 11g)
Query to get Status of Students as 'Pass' or 'Fail' Using Date Condition [message #607817] Wed, 12 February 2014 05:02 Go to next message
sonudev
Messages: 26
Registered: November 2009
Location: bangalore
Junior Member
Hi,

I need to find the list of students as 'Pass' or 'Fail' for a particular year. Then how to write a query using one date condition, lets say a year like 2013 from a list of years.
Suppose I have the data like:

name year status
XX 2010 Pass
XY 2011 Fail
XZ 2013 Pass
XD 2011 Pass
XF 2013 Pass
XC 2010 Fail
XB 2010 Pass

My requirement is:

Name Year Status
..... .... .....
XZ 2013 Pass
XF 2013 Pass
XY 2011 Fail
XD 2011 Pass
XX 2010 Pass
XC 2010 Fail
XB 2010 Pass




Re: Query to get Status of Students as 'Pass' or 'Fail' Using Date Condition [message #607818 is a reply to message #607817] Wed, 12 February 2014 05:11 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't see any difference (except sort order). So, what does "using one date condition" mean? I'm afraid I don't understand it.
Re: Query to get Status of Students as 'Pass' or 'Fail' Using Date Condition [message #607819 is a reply to message #607817] Wed, 12 February 2014 05:14 Go to previous messageGo to next message
John Watson
Messages: 8930
Registered: January 2010
Location: Global Village
Senior Member
This is a college homework question? If you show what SQL you have tried so far, and what problems you have with it, and then someone can advise.
Re: Query to get Status of Students as 'Pass' or 'Fail' Using Date Condition [message #608225 is a reply to message #607819] Mon, 17 February 2014 13:42 Go to previous message
sonudev
Messages: 26
Registered: November 2009
Location: bangalore
Junior Member
John! actually, I asked because I just didn't get it properly on first thought. But anyway I have got my hints. Thanks to all of you.
Previous Topic: ORDER BY the day of the week
Next Topic: EMAIL from ORACLE8i using Corporate Netwrok
Goto Forum:
  


Current Time: Tue Apr 23 07:40:06 CDT 2024