Database schema (posgresql):
Student(id, name, last_name, e_mail) Teacher(id, name, last_name, e_mail, subject)
It is necessary:
Print all ' last_name
' and ' name
' of all ' Teacher
' and ' Student
' with a ' type
' field (student or teacher). Sort alphabetically by ' last_name
'. It should look like this:
last_name | type | Kankava | teacher Smith | student Sidorov | teacher Petrov | teacher
I don’t understand how to add a TYPE
column to SELECT
and link it to a table?