Weather Observation Station 4

Sort by

recency

|

1459 Discussions

|

  • + 0 comments

    SELECT COUNT(CITY) - COUNT(DISTINCT CITY) AS DIFFERENCE FROM STATION;

  • + 0 comments
    set serveroutput on
    declare 
    v_no_1 number;
    v_no_2 number;
    BEGIN
    select count(city) into v_no_1 from station;
    select count(distinct city) into v_no_2 from station;
    dbms_output.put_line(v_no_1-v_no_2);
    end;
    

    /

  • + 0 comments

    SELECT SUM(COUNT() - 1) FROM STATION GROUP BY CITY HAVING COUNT() > 1;

  • + 0 comments

    Best Answer is: SELECT COUNT (CITY) - COUNT(DISTINCT CITY) FROM STATION;

  • + 1 comment

    It’s always helpful when database logic is explained in a simple, real-world way. Really appreciate the clarity and the effort that went into this! Betinexchange 247.com