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 the rows from table1, where the department of agents is equal to that in table2.
I tried several different connection statements, but I either misunderstood the syntax, or simply won't work with this table setting. I am a beginner when it comes to MySQL and from what I read JOIN is at the difficult end of the spectrum!
Another option I considered is to duplicate the "department" column in table1, but this will require a bit more coding on the interface, and I'm trying to figure out if I can achieve the desired result without doing this.
Any help is greatly appreciated.
source share