From the course: CompTIA Data+ (DA0-002) Cert Prep
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Working with dates
From the course: CompTIA Data+ (DA0-002) Cert Prep
Working with dates
- [Instructor] Working with dates can be among the trickiest operations in many analytics environments. We might be tempted to simply place dates in a character string data type and then just treat them like text, but this poses some challenges. If a date is simply written as text, it becomes very difficult to work with it in any other way. For example, if we have a text string containing a date like July 1st, 2022, and we want to find out what the next day is, we can't simply add one to a text string. That's not a valid option. You'd have all sorts of strange possibilities here, depending upon the environment you're in. For example, you might wind up treating one as a string and then concatenating the two strings to get the string July 1st, 20221, which is meaningless. However, if we use the special data types that are created to support dates, they give us a lot more flexibility. Now we can take July 1st, 2022 and add one to get the expected result July 2nd, 2022. When we use date…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Structured query language3m 41s
-
SELECT statement2m 27s
-
(Locked)
Sorting results4m 3s
-
(Locked)
Filtering data4m 1s
-
(Locked)
NULL values3m 26s
-
(Locked)
Aggregating data3m 8s
-
(Locked)
Grouping data3m 7s
-
(Locked)
String manipulation2m 43s
-
(Locked)
Working with dates2m 14s
-
(Locked)
Derived values3m 16s
-
(Locked)
Set operations5m 37s
-
(Locked)
Join operations1m 58s
-
(Locked)
Inner joins7m 7s
-
(Locked)
Joining multiple tables6m 34s
-
(Locked)
Outer joins2m 55s
-
(Locked)
Nested queries2m 17s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-