Question of the Day
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished
------ -------- ---- ---------------
1 Cowboys Dallas 1960
2 Eagles Philadelphia 1933
3 Packers Green Bay 1919
4 Chiefs Kansas City 1960
5 49ers San Francisco 1946
6 Broncos Denver 1960
7 Seahawks Seattle 1976
8 Patriots New England 1960
If I run this code, how many rows are returned?
SELECT
YearEstablished,
json_objectagg(city : TeamName)
FROM dbo.NFLTeams
GROUP BY YearEstablished;
See possible answers