How to use the DATE_TRUNC Function in SQL (vs. TO_CHAR)

Описание к видео How to use the DATE_TRUNC Function in SQL (vs. TO_CHAR)

In this tutorial, you'll learn how to use the DATE_TRUNC function in SQL to optimize queries using dates!

Watch the TO_CHAR video:    • Using the TO_CHAR function in SQL Cha...  

Queries:
1) Truncate for the day: SELECT date, DATE_TRUNC('day',date) FROM table
2) Do some truncated date math: SELECT DATE_TRUNC('day',date1)-DATE_TRUNC('day',date2) FROM table

Get the Pagila Database:    • How to Load a Sample PostgreSQL Datab...  

Support the Channel:
1) Subscribe: https://www.becomingads.com/o/youtube
2) DataCamp:
3) Udacity:

Комментарии

Информация по комментариям в разработке