Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Data Wrangling with SQL
  • Table Of Contents Toc
Data Wrangling with SQL

Data Wrangling with SQL

By : Raghav Kandarpa, Shivangi Saxena
4.6 (25)
close
close
Data Wrangling with SQL

Data Wrangling with SQL

4.6 (25)
By: Raghav Kandarpa, Shivangi Saxena

Overview of this book

The amount of data generated continues to grow rapidly, making it increasingly important for businesses to be able to wrangle this data and understand it quickly and efficiently. Although data wrangling can be challenging, with the right tools and techniques you can efficiently handle enormous amounts of unstructured data. The book starts by introducing you to the basics of SQL, focusing on the core principles and techniques of data wrangling. You’ll then explore advanced SQL concepts like aggregate functions, window functions, CTEs, and subqueries that are very popular in the business world. The next set of chapters will walk you through different functions within SQL query that cause delays in data transformation and help you figure out the difference between a good query and bad one. You’ll also learn how data wrangling and data science go hand in hand. The book is filled with datasets and practical examples to help you understand the concepts thoroughly, along with best practices to guide you at every stage of data wrangling. By the end of this book, you’ll be equipped with essential techniques and best practices for data wrangling, and will predominantly learn how to use clean and standardized data models to make informed decisions, helping businesses avoid costly mistakes.
Table of Contents (21 chapters)
close
close
1
Part 1:Data Wrangling Introduction
4
Part 2:Data Wrangling Techniques Using SQL
9
Part 3:SQL Subqueries, Aggregate And Window Functions
13
Part 4:Optimizing Query Performance
15
Part 5:Data Science And Wrangling

SQL DATE data type functions

The DATE data type typically takes 4 bytes of storage in a database and can hold date values with a range of 1000-01-01 to 9999-12-31. The TIMESTAMP data type is similar to the DATE data type, but it also includes information about the time to a precision of one second. The format used to store timestamp values is typically YYYY-MM-DD HH:MM:SS.

There are several date functions provided by the SQL engine to manipulate the date and time information stored in date or DateTime columns. Let’s look at each of them in detail.

Figure 4.1 – DateTime functions

Figure 4.1 – DateTime functions

EXTRACT

The SQL EXTRACT function is used to extract a part of a date or a timestamp value. The function takes two arguments: the first is the part of the date or timestamp that you want to extract (such as the year, month, or day), and the second is the date or timestamp value that you want to extract from. The syntax for the EXTRACT function is as follows:

...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Data Wrangling with SQL
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon