Write a query in SQL to obtain the nurses and the block where they are booked for attending the patients on call.
Sample table: nurse
employeeid | name | position | registered | ssn
------------+-----------------+------------+------------+-----------
101 | Carla Espinosa | Head Nurse | t | 111111110
102 | Laverne Roberts | Nurse | t | 222222220
103 | Paul Flowers | Nurse | f | 333333330
nurse | blockfloor | blockcode | oncallstart | oncallend
-------+------------+-----------+---------------------+---------------------
101 | 1 | 1 | 2008-11-04 11:00:00 | 2008-11-04 19:00:00
101 | 1 | 2 | 2008-11-04 11:00:00 | 2008-11-04 19:00:00
102 | 1 | 3 | 2008-11-04 11:00:00 | 2008-11-04 19:00:00
103 | 1 | 1 | 2008-11-04 19:00:00 | 2008-11-05 03:00:00
103 | 1 | 2 | 2008-11-04 19:00:00 | 2008-11-05 03:00:00
103 | 1 | 3 | 2008-11-04 19:00:00 | 2008-11-05 03:00:00
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer