Find Jobs
Hire Freelancers

T-SQL query to use with SSMS SQL 2012 Server

$30-250 USD

Slutfört
Publicerad över åtta år sedan

$30-250 USD

Betalning vid leverans
Need a sql query, which can be run in ssms, to produce the output as illustrated in the attached spreadsheet breakouts. I have included a text file with the script to create the sampled data as well as the outcome spreadsheet illustration. The scenario: Multiple mail clerks deliver mail throughout our campus. We have begin locating them by RFID When they are at any workstation, our application stores: The Mail clerk's ID The workstation identifier a date-time stamp Example MailClerk 1 arrives at workstation 1 at 10:00am and he stays until 10:05 am at that workstation Our data table would receive approximately 3 record inserts, as follows, HitID 001 MailClerkID: 1 WorkStation:1 DateTmeOfHit: 10:00 HitID 004 MailClerkID:1 WorkStation:1 DateTimeOfHit: 10:02 HitID 007 MailClerkID:1 WorkStation:1 DateTimeOfHit: 10:05 HitID 011 MailClerkID:1 WorkStation:2 DateTimeOfHit: 10:08 At HitID 011 - he has moved to a different workstation, but for Hits001 through Hits007, he was at the SAME STATION, and that is the blocks-of-time-at-same-station we are looking for. The attached spreadsheet has worksheets for the raw source data, a breakout by 3 different mail clerks, the color-coded blocks of time at each mail station for these 3 clerks, and the [DesiredReportOutput] worksheet. IMPORTANT: the data in the table in the DESIREDREPORTOUTPUT table is the ONLY output WE NEED
Project ID: 9529563

Om projektet

6 anbud
Distansprojekt
Senaste aktivitet åtta år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag
Tilldelad till:
Använd avatar
$105 USD Om 1 dag
5,0 (166 omdömen)
7,6
7,6
6 frilansar lägger i genomsnitt anbud på $127 USD för detta uppdrag
Använd avatar
Hello, I think this can be done only by using a stored procedure ....................................
$155 USD Om 3 dagar
4,9 (452 omdömen)
7,4
7,4
Använd avatar
Hi, I have ready the query you need. The query is giving same desire result as your expectation. I can give you demo now. Let me know for demo before select any developer. I can show result with your raw data as below: MailClerkId WorkStation firsthit lasthit duration 2 2 2016-01-25 06:04:00.000 2016-01-25 06:08:00.000 4 Minutes 2 1 2016-01-25 06:22:00.000 2016-01-25 06:28:00.000 6 Minutes 2 2 2016-01-25 06:30:00.000 2016-01-25 06:36:00.000 6 Minutes 3 12 2016-01-25 06:21:00.000 2016-01-25 06:25:00.000 4 Minutes 3 17 2016-01-25 06:29:00.000 2016-01-25 06:35:00.000 6 Minutes 4 34 2016-01-25 06:25:00.000 2016-01-25 06:29:00.000 4 Minutes 4 35 2016-01-25 06:31:00.000 2016-01-25 06:35:00.000 4 Minutes 4 38 2016-01-25 06:39:00.000 2016-01-25 06:45:00.000 6 Minutes Thanks Daya
$99 USD Om 1 dag
5,0 (10 omdömen)
5,1
5,1

Om kunden

Flagga för UNITED STATES
Smyrna, United States
5,0
1
Verifierad betalningsmetod
Medlem sedan feb. 1, 2016

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.