Weather Observation Station 19

Sort by

recency

|

2214 Discussions

|

  • + 0 comments

    select round( sqrt( power( max(lat_n)-min(lat_n) ,2)+ power( max(long_w)-min(long_w) ,2)),4) from station;

  • + 0 comments

    I am using this query but getting error can anyone help

    WITH sorted_lat AS ( SELECT lat_n FROM station ORDER BY lat_n ASC ), counting AS ( SELECT COUNT(*) AS total_count FROM station ) SELECT ROUND( CASE WHEN total_count % 2 != 0 THEN (SELECT lat_n FROM sorted_lat LIMIT 1 OFFSET total_count / 2) ELSE ( (SELECT lat_n FROM sorted_lat LIMIT 1 OFFSET (total_count / 2) - 1) + (SELECT lat_n FROM sorted_lat LIMIT 1 OFFSET total_count / 2) ) / 2 END, 4 ) FROM counting;

  • + 0 comments

    ms sql server: select format(round(sqrt(power(min(lat_n)-max(lat_n), 2) + power(min(long_w)-max(long_w), 2)), 4), '0.####') from station

  • + 0 comments

    select round( SQRT( POWER(MAX(LAT_N)-MIN(LAT_N),2) + POWER(MAX(LONG_W)-MIN(LONG_W),2) ) ,4) from STATION;

  • + 0 comments
    WITH cte AS
    (
        SELECT
            MAX(LAT_N) AS max_ltn,
            MIN(LAT_N) AS min_ltn,
            MAX(LONG_W) AS max_lgw,
            MIN(LONG_W) AS min_lgw
        FROM
            STATION
    )
    
    SELECT
        ROUND(
            SQRT(((max_ltn - min_ltn) * (max_ltn - min_ltn)) +
                 ((max_lgw - min_lgw) * (max_lgw - min_lgw))), 4
            )
    FROM
        cte