Skip to Main Content
Data Analysis Using SQL and Excel, 2nd Edition
book

Data Analysis Using SQL and Excel, 2nd Edition

by Gordon S. Linoff
December 2015
Beginner to intermediate content levelBeginner to intermediate
792 pages
20h 55m
English
Wiley
Content preview from Data Analysis Using SQL and Excel, 2nd Edition

CHAPTER 5 It’s a Matter of Time

Along with geography, time is a critical dimension describing customers and businesses. This chapter introduces dates and times as tools for understanding customers. This is a broad topic. The next two chapters extend these ideas by introducing survival analysis, the branch of statistics also known as time-to-event analysis.

This chapter approaches time from several different vantage points. One perspective is the values that represent dates and times, the years, months, days, hours, and minutes. Another is when things happen, along with ways to visualize changes over time and year-over-year comparisons. Yet another perspective is duration, the difference between two dates, and even how durations change over time.

The two datasets used for examples—purchases and subscribers—have date stamps accurate to the day, rather than time stamps accurate to the minute, second, or fraction of a second. This is not an accident. For many business purposes, the date component is the most important part, so this chapter focuses on whole dates. The ideas can readily be extended from dates to times with hours, minutes, and seconds.

Times and dates are complex data types, comprised of six different components and an optional seventh. Years, months, days, hours, minutes, and seconds are the six. In addition, time zone information may or may not be present. Fortunately, databases have similar functionality for dates and times, such as functions to extract each component. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Analysis Using SQL and Excel

Data Analysis Using SQL and Excel

Gordon S. Linoff
SQL for Data Analysis

SQL for Data Analysis

Cathy Tanimura

Publisher Resources

ISBN: 9781119021438Purchase book