Hi All,
My name is Ankit Shrivastava and I am a Data Engineer.
Today this #vlog is regarding #sql How to Calculate start & end time of transaction and average time spent in one successful transaction.
This #sql question was asked in one of the #startup to get the average time taken by users to complete successful transaction and based on that they wanted to improve the transaction time and the user experience.
I have used analytical function to calculate #average time
Please find the below DDL for practice. Please insert the no of rows you want for practice:-
create table transactions (id int, tran_date_time datetime, value int)
insert into transactions values (1,SYSDATETIME(),1)
insert into transactions values (2,SYSDATETIME(),1)
insert into transactions values (1,SYSDATETIME(),0)
insert into transactions values (2,SYSDATETIME(),0)
insert into transactions values (3,SYSDATETIME(),1)
#etl developers #etltesting #dataengineering #dataanalysts #datanalysis #datanalytics #bigdata
Please find the link of my all previous videos:-
#sql to achieve last NOT NULL value from the record | Analytical Function | Data Engg | Data Analyst
Link • #sql to achieve last NOT NULL value f...
#sql to identify Top Performing Product every Quarter of each year | Highest sale every quarter
Link • #sql to identify Top Performing Produ...
#sql Interview Question - Calculate Running Total | Cumulative sum | UNBOUNDED PRECEDING FOLLOWING
Link • #sql Interview Question - Calculate R...
#sql Interview question - Schedule cricket match between teams and generate points table using SQL
Link https://lnkd.in/dsM8Pe8B
#sql Interview Questions - All JOINS (INNER, LEFT, RIGHT, FULL OUTER) | JOIN only NULL values
Link https://lnkd.in/dJttWQBB
#sql Interview Question - What is the difference between COUNT(*), COUNT(1) and COUNT(-1)
Link https://lnkd.in/dVHMWxKj
#SQL Interview Question - How to delete duplicate record from table
Link https://lnkd.in/dcVyhC7X
#SQL Interview Question -Second highest salary using dense rank analytical function
Link https://lnkd.in/daBumQfB
#SQL to pull unique record after combination of column
hashtag
hashtag#SELFJOIN
Link https://lnkd.in/d6tXYXCv
#SQL Join on duplicate values all four joins (INNER, LEFT, RIGHT, FULL OUTER)
Link https://lnkd.in/d9HcwkZs
Watch video #sql online without registration, duration hours minute second in high quality. This video was added by user Daily life of a Data Engineer 08 January 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,18 once and liked it 13 people.