Weather Observation Station 4

  • + 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);