I am looking to tune up my query.
SELECT student_id,net_id
FROM nstudent
WHERE status_id=3
INNER JOIN ndepart using (net_id)
WHERE NOT deleted;
The above query shows the result but i also want to get the depart_name which is ndepart table, but i cannot figure out how would i do it (probably in descending order)?
Types
- student_id,net_id are bigint.
- depart_name is character
- status_id is integer.
FK/PK's
- net_id is primary key for ndepart
- foreign key in nstudent and student_id is primary key for nstudent.
Thank you