How do Inner Joins 4/10

how do Inner Joins 4/10

Post a link to the lesson, your errors, and your code?

Link to the problem:

https://www.codecademy.com/courses/learn-sql-multiple-tables/lessons/multiple-tables/exercises/inner-join-ii?action=resume_content_item&course_redirect=learn-sql

I am having issues specifically with step 3:
“Join newspaper and online on id (the unique ID of the subscriber).
How many rows are in this table?”

Code that doesn’t work:

SELECT COUNT (*)
FROM newspaper
JOIN online
ON newspaper.id = online.id;

Error that I get: Did you remember to count all rows of online joined with newspaper?

I don’t understand why this is wrong. The hint is exactly the same as what I entered but it doesn’t work. If I understand the steps right, it should be correct.

Did you figure out why? I just tried your code and it worked, my problem is I don’t get why we needed to count it joining as the question didn’t specify that.

  1. Don’t remove your previous queries (see below)
    Join newspaper table and online table on their id columns (the unique ID of the subscriber).
    How many rows are in this table?

My answer was SELECT * FROM newspaper
JOIN online
ON newspaper.id = online.id;

From the question, I understood that they wanted to see both ‘newspaper’ and ‘online’ table join on their ‘id’ column, and user mtf understood it similarly 4. Inner joins step 1. Counting newspaper subscribers

(The previous questions if anyone is interested: 1) The Codecademy Times, a newspaper with two types of subscriptions: print newspaper & online articles.
Some users subscribe to just the newspaper, some subscribe to just the online edition, and some subscribe to both.
There is a newspaper table that contains information about the newspaper subscribers.
Count the number of subscribers who get a print newspaper using COUNT() .

  1. Don’t remove your previous query.
    There is also an online table that contains information about the online subscribers.
    Count the number of subscribers who get an online newspaper using COUNT() .

from https://www.codecademy.com/courses/learn-sql/lessons/multiple-tables/exercises/inner-join-ii)