Jump to content
usserrr

Sql Query

Recommended Posts

Posted

Am o tabela cu urmatoarele campuri si inregistrari:

record_id employee_id date_time in_out

1 1 06.10.2009 07:30:21 TRUE

2 2 06.10.2009 07:30:45 TRUE

3 3 06.10.2009 07:31:01 TRUE

4 1 06.10.2009 10:18:21 FALSE

5 2 06.10.2009 10:20:38 FALSE

6 3 06.10.2009 10:22:45 FALSE

7 2 06.10.2009 10:31:57 TRUE

8 1 06.10.2009 10:33:10 TRUE

9 3 06.10.2009 10:34:21 TRUE

10 1 06.10.2009 15:32:31 FALSE

11 2 06.10.2009 15:33:00 FALSE

12 3 06.10.2009 15:35:32 FALSE

Acestea fiind spuse,contruiti un query pentru a extrage urmatoarele date:

employee_id datein dataout

1 06.10.2009 07:30:21 06.10.2009 10:18:21

2 06.10.2009 07:30:45 06.10.2009 10:20:38

3 06.10.2009 07:31:01 06.10.2009 10:22:45

2 06.10.2009 10:31:57 06.10.2009 15:33:00

1 06.10.2009 10:33:10 06.10.2009 15:32:31

3 06.10.2009 10:34:21 06.10.2009 15:35:32

Altfel spus un query prin care se poate calcula perioada cat s-a stat inauntru,si eventual daca se poate un alt query pentru a calcula perioada cat s-a stat afara.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...