Question : I’d like to produce the generic quarter end date for a given date. Ex:If I have 2010-01-01, I […]
Tag: interval
Convert Varchar to Interval
Question : I have a Postgresql column that is a varchar that is saving a string that looks like ‘2 […]
How do I form an SQL query to show entire column of dates with modified values?
Question : Assume that I have a table Purchases with column named PurchaseDate and with data format of ‘YYYY-MM-DD HH:MI:SS’. […]
Select results inclusively based on NOW()
Question : My query is the following: SELECT count(db.user_data.page_url) AS total_urls, db.authors.author FROM db.authors LEFT JOIN db.user_data ON db.authors.author_id = […]
Get value increment during an hour of a day
Question : I query YouTube Data Api for a list of most popular videos on a channel and then get […]
How to group time intervals by order of magnitude in Postgres?
Question : I have a bunch of time intervals that I would like to analyze. (Thousands of them.) They range […]
How to add a generated column with an expression subtracting days?
Question : I have this table in PostgreSQL 13: CREATE TABLE public.”domain” ( id int8 NOT NULL GENERATED ALWAYS AS […]
Select all overlapping ranges from starting range
Question : My question is similar to this one with (I think) significant enough difference. I have a base range […]
Computing the set difference of tables of intervals
Question : I often run into the following problem. I have two tables of intervals. They are bounded by dates […]
MySQL – Merge or split datetime intervals (start date to end date)
Question : I have a table which stores a list of activities with an interval of time delimited by 2 […]
- 1
- 2