2

How to find the 50th percentile date and time filed for example from below set in PostgreSQL

file_time
8/14/18 2:57:38
8/14/18 2:56:59
8/14/18 2:54:43
8/14/18 2:54:27
8/14/18 2:54:16
8/14/18 2:53:42
8/14/18 2:53:26
8/14/18 2:53:20
8/14/18 2:53:11
8/14/18 2:51:49
8/14/18 2:51:09
8/14/18 2:50:32

I tried to use below function in postgreSQL

percentile_disc(0.50) within group (order by file_time asc) 

Can anyone tell me if this is correct way to find it? Thanks

S-Man
  • 22,521
  • 7
  • 40
  • 63
Madhu
  • 367
  • 2
  • 7
  • 20

0 Answers0