Arungiri G

Arungiri G

  • NA
  • 41
  • 4.2k

Hi any solution to this where I need to change

Sep 14 2022 7:09 AM

with median as
(select lat_n, row_number () over (order by lat_n asc) as row_asc,row_number () over (order by lat_n desc) as row_desc
from station
 
 )
 select round(avg(lat_n),4)
 from median
 where abs(row_asc-row_desc) <= 1
 
 ERROR 1690 (22003) at line 1: BIGINT UNSIGNED value is out of range in '(median.row_asc - median.row_desc)'
 
 while doin the same in postgresql the error shows-
 ERROR:  function round(double precision, integer) does not exist
LINE 7: select round(avg(lat_n),4)
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
SQL state: 42883
Character: 152


Answers (2)