I am making a hardware & software inventory database. I've got a many-to-many relationship between my PC table and my software table so I can keep track of which software is installed on which PC. I also have a one-to-many relationship between my software table and the license table (the license table counts how many licences I have and when they expire).
Now I need a query that compares how often a software is installed with how many licences I've got for that software. I made a query that uses the amount function to count how often the softwareID occurs in the link table between the software and the pc table. I also made a query that uses the sum function to count the total licences of each software. These both work on their own, but if I combine them into one query the total number of licences are for some reason multiplied by the number of PCs that software is installed on
Can anyone tell me how to fix this?
Thanks
Now I need a query that compares how often a software is installed with how many licences I've got for that software. I made a query that uses the amount function to count how often the softwareID occurs in the link table between the software and the pc table. I also made a query that uses the sum function to count the total licences of each software. These both work on their own, but if I combine them into one query the total number of licences are for some reason multiplied by the number of PCs that software is installed on

Can anyone tell me how to fix this?
Thanks