Get the 1st record and last record of a day in postgresql

by Sridhar Balaraman   Last Updated July 12, 2019 04:06 AM

Below is the table structure. |Createdtime | Value | --------------------------|-------------- |2019-06-02 00:25:35.86+08|7805165.31 Mb |2019-06-02 00:03:52.645+08|7796650 Mb |2019-06-02 05:16:30.108+08|7757693.25 Mb |2019-06-02 05:41:25.737+08|7758570.94 Mb |2019-06-02 05:32:17.743+08|7758576.31 Mb |2019-06-02 05:59:59.817+08|7760187.25 Mb |2019-06-02 05:50:47.463+08|7758511.81 Mb |2019-06-03 11:19:54.337+08|7764680.25 Mb |2019-06-03 11:42:35.448+08|7764677.63 Mb |2019-06-03 11:54:08.578+08|7764681.63 Mb |2019-06-03 12:18:19.116+08|7764683.63 Mb |2019-06-03 12:30:52.553+08|7764686.63 Mb |2019-06-03 22:57:51.778+08|7728657.13 Mb |2019-06-03 23:12:38.93+08|7735638.06 Mb |2019-06-03 23:25:21.318+08|7706719.19 Mb

I want the o/p like below

enter image description here

Tags : postgresql


Related Questions


Updated April 09, 2018 20:06 PM

Updated June 06, 2017 18:06 PM

Updated May 15, 2017 19:06 PM

Updated March 15, 2017 02:06 AM