i need MS SQL expert

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

i need MSSQL expert to work right now for small project

have log data and I'm trying to back-fill the data as much as possible to help improve analytics.

The log data contains a SessionId, which is the SessionId created by the browser, the Name of the logged in user (if they are logged in) and a LogTime.

I'm trying to get all the related sessions, sessions that are within 24 hours of each other, and get the first date of that group of sessions, the last date of that group of sessions and populate the first not null and not empty name into all the other name spaces.

For instance, if I had the following data:

--Id SessionId Name LogTime

--1 1 2018-01-01 00:00

--2 1 LargeOne 2018-01-01 12:00

--3 2 Two 2018-01-01 13:00

--4 3 NULL 2018-01-02 00:00

--5 3 2018-01-03 00:00

--6 1 One 2018-01-03 00:00

--7 2 2018-01-03 00:00

--8 2 LargeTwo 2018-01-04 00:00

--9 1 2018-01-04 00:00

I would like to process the data as follows:

--Id SessionId Name LogTime StartTime EndTime

--1 1 LargeOne 2018-01-01 00:00 2018-01-01 00:00 2018-01-01 12:00

--2 1 LargeOne 2018-01-01 12:00 2018-01-01 00:00 2018-01-01 12:00

--3 2 Two 2018-01-01 13:00 2018-01-01 13:00 2018-01-01 13:00

--4 3 NULL 2018-01-02 00:00 2018-01-02 00:00 2018-01-03 00:00

--5 3 NULL 2018-01-03 00:00 2018-01-02 00:00 2018-01-03 00:00

--6 1 One 2018-01-03 00:00 2018-01-03 00:00 2018-01-04 00:00

--7 2 LargeTwo 2018-01-03 00:00 2018-01-03 00:00 2018-01-04 00:00

--8 2 LargeTwo 2018-01-04 00:00 2018-01-03 00:00 2018-01-04 00:00

--9 1 One 2018-01-04 00:00 2018-01-03 00:00 2018-01-04 00:00

Ids 1 and 2 are in the same session and in range (24 hours) of each other so they make one set, notice that the Id 1 doesn't have a name column but Id 2 does and because it's part of the same set, it backfills the name. Ids 6 and 9 are also in session 1 but is not in the 24 hour range of the first set so it makes a new set, Ids 6 and 9 are both in session 1 and even though new sessions appear between them, they are still the same session within range so they make a new set.

I've attached the full question and what I've tried as a txt file

or

I tried to put up this bid previously with my Stack Overflow question, I'm happy for you to give me the answer via freelancer so that I can't avoid paying you, i just think it's easier to read on SO that on that txt file

[login to view URL]

.NET C# Programming Database Administration Microsoft SQL Server SQL

Project ID: #16488759

About the project

16 proposals Remote project Active 6 years ago

16 freelancers are bidding on average ₹13090 for this job

rinsadsl

HI, I am expert in SQL query and I can help you in creating sql commands. I couldn't find any attachment in the bid

₹13888 INR in 5 days
(119 Reviews)
7.4
vinaysinghh

A proposal has not yet been provided

₹5555 INR in 3 days
(52 Reviews)
5.3
supergana

Hi - Getting his in a single query is going to make it way too complex with nested statements. Best suggestion is to go for a stored procedure with some views and queries on it. Will be happy to discuss further details More

₹9998 INR in 2 days
(13 Reviews)
4.1
bnrajumnc

A proposal has not yet been provided

₹5555 INR in 3 days
(9 Reviews)
3.7
sqldelivery

I have great experience in application log analyzing through SQL so i think my skills will help to resolve your task in effective way.

₹13888 INR in 3 days
(1 Review)
1.6
ashokkumar0101

I have rich 10+ years experience in MS Sql developer com developer. I have designed 50+ databases. Create database objects such as tables, stored procedures , UDFs & triggers, views etc. great experience of query op More

₹11111 INR in 3 days
(0 Reviews)
0.0
adnanshafi91

Sir, i will do my best . This is my first project, just one chance to proof my self vry hard working Relevant Skills and Experience What kind of problem you have face . Let me know then i will give you the solutions .

₹7777 INR in 3 days
(0 Reviews)
0.0
chandu213

.....................................................................................................................................................................................................

₹7777 INR in 3 days
(0 Reviews)
0.0
murali91921

A proposal has not yet been provided

₹5555 INR in 3 days
(0 Reviews)
0.0
Thilagavathy92

Good in SQL

₹5555 INR in 1 day
(0 Reviews)
0.0
vinodsonawane123

We need to use the case statement for id and session id then arrange log date and time in desc order by select statement. if you want I will provide query.

₹8888 INR in 2 days
(0 Reviews)
0.0
chandan231981

A proposal has not yet been provided

₹77777 INR in 3 days
(0 Reviews)
0.0
jemaineCole

Hi, I have already solved your problem. Please accept my bid and I will provide the solution. Kind regards, Jemaine Skills: • Creating and altering database objects as per business requirements which in More

₹7777 INR in 3 days
(0 Reviews)
0.0
raajasekarm

Good experiencing in SQL, T-SQL and PL/SQL programming. I've designed and written many SQLs, which are both ad hoc and transactional in nature.

₹12777 INR in 2 days
(0 Reviews)
0.0