It looks as if a small but important detail was omitted from the first line of the query. Instead of
SELECT c.fullname, c.id, usr.firstname, usr.lastname, usr.id, usr.username, usr.email
try
SELECT c.fullname, c.id cid, usr.firstname, usr.lastname, usr.id uid, usr.username, usr.email
The column list in the first SELECT statement includes two identically named columns from different tables. Each column name in the result must be unique, so SQL will only include one of them in the result. To prevent conflicting (i.e. identical) column names you give a new name to the result columns by adding the new output column names after the input column names, separated by a space. (You only
need to rename one of them, but it's clearer if you rename both to make it obvious in the output which is the course Id and which is the user Id).
Note that the other output column names (fullname, firstname, lastname, username, email) do not include any duplicates and so are not 'lost' in the output.
You can, in fact, rename
any output columns, however you only
need to rename them when names clash (i.e. when column names match across different input tables). This is standard SQL.
E.g.
SELECT c.fullname aFullName, c.id aCourseId, usr.firstname aFirstName, usr.lastname aLastName, usr.id aUserId, usr.username aUserName,