Select data from one table with id from another so as text is saying I need to grab user id by name from one table and then select count from another table by that ID. is it possible?



users table

ID | User


online table

ID
How about something more like:

SELECT COUNT(users.id)
FROM users
    INNER JOIN online
        ON online.ID = users.ID
WHERE users.id = 'myuser';