BaşlayınÜcretsiz Başlayın

Date arithmetic

You can subtract dates or timestamps from each other.

You can add time to dates or timestamps using intervals. An interval is specified with a number of units and the name of a datetime field. For example:

  • '3 days'::interval
  • '6 months'::interval
  • '1 month 2 years'::interval
  • '1 hour 30 minutes'::interval

Practice date arithmetic with the Evanston 311 data and now().

Bu egzersiz

Exploratory Data Analysis in SQL

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Subtract the min date_created from the max
SELECT ___
  FROM evanston311;
Kodu Düzenle ve Çalıştır