Weather Observation Station 4

Sort by

recency

|

1391 Discussions

|

  • + 0 comments

    Umm... "SELECT UNIQUE (SELECT COUNT(CITY) FROM STATION) - (SELECT COUNT(DISTINCT CITY) FROM STATION) FROM STATION;"

  • + 0 comments

    Let me explain this for MySQL. For this question you actually need three answers so you will have to write SELECT three times. And two of those times are their own queries so you have to write almost the full syntax besides the ending ; while the last is just a calculation you can just write SELECT and the - operator. So this is how you write it.

    SELECT (SELECT COUNT(city) FROM STATION) - (SELECT COUNT(DISTINCT CITY) FROM STATION);

  • + 0 comments

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

  • + 0 comments

    (select sum(city) from station) minus (select sum(distinct city) from station);

  • + 0 comments

    SELECT (SELECT COUNT(*) FROM STATION) - (SELECT COUNT(DISTINCT CITY) FROM STATION) AS Difference;