Hi,
I have two tables with the following columns:
table1:
id, agent_name, ticket_id, category, date_logged
table2:
id, agent_name, department, admin_status
What I'm trying to achieve is to Select all rows from table1 where an agents department is equal to that of table2.
I've tried a few different join statements but I'm either getting the syntax wrong or it just won't work with this table setup. I'm a beginner when it comes to MySQL and from what I've read JOIN's are at the complex end of the spectrum!
One other option I've considered is duplicating the column "department" into table1 but that will require a little bit more coding on the frontend and I'm trying to see if I can achieve the desired result without doing that.
Any assistance greatly appreciated.