Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgres group by 10 minute intervals

SELECT COUNT(*) cnt, 
to_timestamp(floor((extract('epoch' from timestamp_column) / 600 )) * 600) 
AT TIME ZONE 'UTC' as interval_alias
FROM TABLE_NAME GROUP BY interval_alias
Comment

PREVIOUS NEXT
Code Example
Sql :: pl sql ptint 
Sql :: sql order by ascending 
Sql :: pl sql disable trigger 
Sql :: null column to 0 in mysql 
Sql :: postgres change column type to uuid 
Sql :: sql calculate percentage 
Sql :: SQL loop with cursor 
Sql :: sql truncate statement 
Sql :: mysql query to check record exists in database table or not 
Sql :: select top 10 rows in sql 
Sql :: date diff sql 
Sql :: Add SuperUser MySQL 
Sql :: execute mysql file 
Sql :: mysql set id auto increment 
Sql :: psql select unique 
Sql :: select row from mysql where date more than 30 days 
Sql :: SHOW COLUMNS Statement 
Sql :: duplicate records in sql 
Sql :: mysql database create 
Sql :: postgresql find duplicates 
Sql :: select count 
Sql :: multiple count in sql 
Sql :: how to drop a table in mysql 
Sql :: syntaxerror unexpected identifier mysql 
Sql :: mysql count with if 
Sql :: sql pagination offset 
Sql :: oracle log files 
Sql :: events mysql 
Sql :: connexion mysql 
Sql :: check table exist postgresql 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =