I'm trying to create two queries that needs to:
1. display animal and number of animals on loan
I do not know what I'm doing wrong as all regions are showing only 1 animal on loan:
SELECT Animals.Animal, Count(Loans.[Animal ID]) AS [Number oF Animal On Loan]
FROM Loans INNER JOIN Animals ON Loans.ID = Animals.ID
GROUP BY Animals.Animal
ORDER BY Count(Loans.[Animal ID]) DESC;
:banghead:
2. display region of the world and the number of animals on loan from that region:Here is my code and need to know if this correct
SELECT Animals.Region, Count(Loans.[Animal ID]) AS [Number Of Animals On Loan]
FROM Loans INNER JOIN Animals ON Loans.ID = Animals.ID
GROUP BY Animals.Region
ORDER BY Count(Loans.[Animal ID]) DESC;
:banghead:
1. display animal and number of animals on loan
I do not know what I'm doing wrong as all regions are showing only 1 animal on loan:
SELECT Animals.Animal, Count(Loans.[Animal ID]) AS [Number oF Animal On Loan]
FROM Loans INNER JOIN Animals ON Loans.ID = Animals.ID
GROUP BY Animals.Animal
ORDER BY Count(Loans.[Animal ID]) DESC;
:banghead:
2. display region of the world and the number of animals on loan from that region:Here is my code and need to know if this correct
SELECT Animals.Region, Count(Loans.[Animal ID]) AS [Number Of Animals On Loan]
FROM Loans INNER JOIN Animals ON Loans.ID = Animals.ID
GROUP BY Animals.Region
ORDER BY Count(Loans.[Animal ID]) DESC;
:banghead: