¦b¼Æ­Óªí¤¤¬d¸ß

«e­¶ ¥Ø¿ý ¤U­¶

§Ú­Ì¥i¥H¦b¦h©ó¤@­Óªí¤¤¬d¸ß¡A³q±`³o¨Çªí¤À¨É¤@­Ó¦r¸`¡C

³o¼Ëªº¬d¸ß¤]¬O¥Î SELECT »y¥y¥h°µ¡A¦Ó»yªk©M¤@­Óªíªº¬d¸ß¤@¼Ë¡C¤£¹L¡A¦r¬qªº¦WºÙ¥²¶·¥]¬Aªíªº¦WºÙ¡]¼g¦¨ <ªíªº¦WºÙ>.<¦r¬q¦WºÙ>¡^¡A¥H¨¾²V²c¡C

¥H¤U¨Ò¤l®i¥Ü¦p¦ó¦b¼Æ­Óªí¤¤¬d¸ß¡]«ö³oùØ¬Ý¬Ý s6a ¤Î books ¨âªíªº¤º®e¡^¡C

±q s6a ¤Î books ¨âªí¤¤®³¨ú¾Ç¥Í©m¦W¡B®Ñªº¯Á®Ñ¸¹¤ÎÁٮѤé´Á¡A¨ä¤¤ s6a ªº¾Ç¥Í½s¸¹©M books ªº¾Ç¥Í½s¸¹¤@¼Ë¡A¥H¤ÎÁٮѤé´Á¬O¦b¤@¤E¤E¤E¦~¤Q¤@¤ë¤Q¤­¤é«e¡C§â³o¨Ç¶µ¥Ø¨ÌÁٮѤé´Á¥Ñ¥ý¦Ü«á±Æ§Ç¡C
SELECT s6a.name, books.call_id, books.due_date FROM s6a, books
  WHERE s6a.stud_id = books.stud_id AND books.due_date < {11/15/99}
  ORDER BY books.due_date ASC
¿é¥X¡J
name call_id due_date
Sung Hing Wah, Patrick 845678 10/20/1999
Chan Lai Yin 811141 10/24/1999
Yeung Chun 904568 10/29/1999
Lai Fung Chun 899554 10/30/1999
Fung Ching Man, Mandy 844221 10/31/1999
Yeung Chun 821344 11/01/1999
Chow Chi Ling 812112 11/01/1999
Poon Kwok Fai 853222 11/01/1999
Tang Wing Chi 887656 11/04/1999
Wong Ka Tak, Kent 844355 11/09/1999
Chan Wai Man, Raymond 804356 11/09/1999
Tang Wing Chi 891111 11/11/1999
Leung King 899943 11/12/1999
Lee Lai May 811332 11/13/1999
Hung Wai Ming 804890 11/14/1999
Yeung Chun 845223 11/14/1999
¡@
±q s6a ¤Î books ¨âªí¤¤®³¨ú¾Ç¥Í©m¦W¡B®Ñªº¯Á®Ñ¸¹¡B¹q¶l¦a§}¤ÎÁٮѤé´Á¡A¨ä¤¤ s6a ªº¾Ç¥Í½s¸¹©M books ªº¾Ç¥Í½s¸¹¤@¼Ë¡A¥H¤ÎÁٮѤé´Á¬O¦b¤@¤E¤E¤E¦~¤Q¤@¤ë¤@¤é«e¡C§â³o¨Ç¶µ¥Ø¨ÌÁٮѤé´Á¥Ñ«á¦Ü¥ý±Æ§Ç¡C

Retrieve the students' names, books' Call IDs, email addresses and due dates from the tables s6a and books where the Student ID in s6a is the same as that in books and the due date is before November 1, 1999. List these items in desscending order of the due dates.

SELECT s6a.name, s6a.email, books.call_id, books.due_date FROM s6a, books
  WHERE s6a.stud_id = books.stud_id AND books.due_date < {11/01/99}
  ORDER BY books.due_date DESC
Output:
name

email

call_id due_date
Fung Ching Man, Mandy mandyfung@example.com 844221 10/31/1999
Lai Fung Chun s96374@sample.edu.hk 899554 10/30/1999
Yeung Chun cyeung@testing.com.hk 904568 10/29/1999
Chan Lai Yin cly@testing.com.hk 811141 10/24/1999
Sung Hing Wah, Patrick patricksung@example.com 845678 10/20/1999