I have been learning how to use nested joins but I can't seem to get them working for my current database.
I want to first find out how many users have made at least one usage (they have some minutes in their account), created their account in 2016, and used an iPhone in 2013. I've tried which is producing an error:
SELECT COUNT(user_id) FROM USER
WHERE usage_count > 0
AND account_created <= ‘2016-12-31’
AND account_created >= ‘2016-01-01’
INNER JOIN PRODUCT
WHERE product = 'iPhone';

INNER JOIN PRODUCT------ you're missing the columns to joinONJOINclauses have to go beforeWHERE.usage_countcolumn in any of your tables, so what isusage_count > 0supposed to refer to?usage_countis in the user table