How to Join two tables with Count , GROUP BY & Join in SQL server?

I have 2 tables with data inserted into each;

address:

INSERT INTO Address (Address_ID, DoorNumber, Street, City, Postcode)
VALUES (1, "26", "Basketball Lane", "Surrey", "SW4 0DF"),
       (2, "2", "ONCE Housing", "Surrey", "PO9 3HJ"),
       (3, "18", "Petits Filous Road", "Surrey", "BA2 7JW"),
       (4, "7A", "Sanpei Heights", "Surrey", "SAN 1HJ"),
       (5, "10B", "Forehead Road", "Surrey", "PO9 3HZ"),
       (6, "9B", "Golden Gate Towers", "Surrey", "BF5 LQZ"),
       (7, "12f", "Hudson River", "Surrey", "GG5 LFZ"),
       (8, "9B", "Sora Close", "Surrey", "AG5 LFZ");

accommodation_details:

INSERT INTO Accommodation_Details (AccomDetails_ID, Room_No, Band, 
            Availability, Total_Cost, Address_ID)
VALUES (1, "1A", "A", "N", 7000, (SELECT Address_ID FROM Address WHERE Street = "Basketball Lane")), 
       (2, "1B", "A", "N", 6950, (SELECT Address_ID FROM Address WHERE Street = "Basketball Lane")),
       (3, "1C", "A", "N", 7000, (SELECT Address_ID FROM Address WHERE Street = "Basketball Lane")), 
       (4, "1D", "A", "Y", 6950, (SELECT Address_ID FROM Address WHERE Street = "Basketball Lane")),
       (5, "1E", "A", "N", 6950, (SELECT Address_ID FROM Address WHERE Street = "Basketball Lane")),
       (6, "2A", "B", "N", 7000, (SELECT Address_ID FROM Address WHERE Street = "ONCE Housing") ),   
       (7, "2B", "B", "Y", 7000, (SELECT Address_ID FROM Address WHERE Street = "ONCE Housing") ),
       (8, "2C", "B", "Y", 7000, (SELECT Address_ID FROM Address WHERE Street = "ONCE Housing") ),
       (9, "2D", "B", "Y", 7000, (SELECT Address_ID FROM Address WHERE Street = "ONCE Housing") ),
       (10, "2E", "B", "Y", 7000, (SELECT Address_ID FROM Address WHERE Street = "ONCE Housing") ),
       (11, "2F","B", "N", 7000, (SELECT Address_ID FROM Address WHERE Street = "ONCE Housing") )

.... ;

I want to be able to represent the total number of “tenant” living at each address (from accommodation_details) like so:

        Tenants:
Basketball Lane | 5 |  (number of tenants with fk of 1 in accomDetails from address)
Once Housing    | 6 |
 ...

I attempted to do this through grouping by address_id in accommodation_details

    SELECT Address_ID, SUM(Address) AS "Total Tenants",
FROM accommodation_details AS accomDetails
JOIN Address ON accomDetails.Address_ID = Address.Address_ID
GROUP BY Address_ID;

but it gives me a “AddressID is ambiguous” error, how can I do this correctly?

Alternate Text Gọi ngay