MySQL Forums
Forum List  »  Quality Assurance

Trouble with mySQL, help please
Posted by: jason luu
Date: May 31, 2008 03:28PM

I am a SQL rookie and need help with SQL thanks in advance

I need to write query that reports (tardys) any student(s) that login 5 min after the earliest time on 5-28-2008 CourseID=1 only that show in the table Attendance in field Date. I am using mySQL


Attendance
+-----------+----------+------------+----------+
| StudentID | CourseID | Date | Time |
+-----------+----------+------------+----------+
| 22174 | 1 | 2008-05-28 | 13:37:28 |
| 22766 | 1 | 2008-05-28 | 13:37:29 |
| 21215 | 1 | 2008-05-28 | 13:37:29 |
| 30039 | 1 | 2008-05-28 | 13:37:35 |
| 22568 | 1 | 2008-05-28 | 13:37:48 |
| 30117 | 1 | 2008-05-28 | 13:37:51 |
| 30378 | 1 | 2008-05-28 | 13:38:12 |
| 21403 | 1 | 2008-05-28 | 13:38:14 |
| 22813 | 1 | 2008-05-28 | 13:38:21 |
| 30014 | 1 | 2008-05-28 | 13:38:23 |
| 30374 | 1 | 2008-05-28 | 13:38:24 |
| 22013 | 1 | 2008-05-28 | 13:38:29 |
| 22416 | 1 | 2008-05-28 | 13:38:32 |
| 22668 | 1 | 2008-05-28 | 13:38:45 |
| 30418 | 1 | 2008-05-28 | 13:41:08 |
| 22069 | 1 | 2008-05-28 | 13:41:12 |
| 22539 | 1 | 2008-05-28 | 13:41:14 |
| 30037 | 1 | 2008-05-28 | 13:41:16 |
| 21038 | 1 | 2008-05-28 | 13:41:19 |
| 30002 | 1 | 2008-05-28 | 13:43:23 |
| 22369 | 1 | 2008-05-28 | 13:43:31 |
| 21182 | 1 | 2008-05-28 | 13:47:39 |
| 30398 | 1 | 2008-05-28 | 15:30:23 |
| 30357 | 3 | 2008-04-03 | 16:34:46 |
| 22129 | 3 | 2008-04-03 | 16:34:46 |
| 20380 | 3 | 2008-04-03 | 16:34:47 |
| 22489 | 3 | 2008-04-03 | 16:34:49 |
| 22109 | 3 | 2008-04-03 | 16:34:51 |
| 22545 | 3 | 2008-04-03 | 16:34:52 |
| 30378 | 3 | 2008-04-03 | 16:34:52 |
| 21261 | 3 | 2008-04-03 | 16:34:53 |
| 30117 | 3 | 2008-04-03 | 16:34:54 |
| 22445 | 3 | 2008-04-03 | 16:34:54 |
| 30037 | 3 | 2008-04-03 | 16:34:55 |
| 22711 | 3 | 2008-04-03 | 16:34:55 |
| 30117 | 3 | 2008-04-03 | 16:34:55 |
| 20343 | 3 | 2008-04-03 | 16:34:56 |
| 22748 | 3 | 2008-04-03 | 16:34:57 |
| 21556 | 3 | 2008-04-03 | 16:34:57 |
| 22761 | 3 | 2008-04-03 | 16:34:58 |
| 22357 | 3 | 2008-04-03 | 16:35:00 |
| 22048 | 3 | 2008-04-03 | 16:35:03 |
| 22256 | 3 | 2008-04-03 | 16:35:08 |
| 22556 | 3 | 2008-04-03 | 16:35:09 |
| 30008 | 3 | 2008-04-03 | 16:35:10 |
| 22762 | 3 | 2008-04-03 | 16:35:16 |
| 20032 | 3 | 2008-04-03 | 16:35:18 |
| 21028 | 3 | 2008-04-03 | 16:35:38 |
| 30034 | 3 | 2008-04-03 | 16:34:46 |
+-----------+----------+------------+----------+



Edited 1 time(s). Last edit at 05/31/2008 05:05PM by jason luu.

Options: ReplyQuote


Subject
Views
Written By
Posted
Trouble with mySQL, help please
2998
May 31, 2008 03:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.