How does Query Store capture cross database queries?
When I was writing my post Capture the most expensive queries across your SQL Server using Query Store a question crossed...
2017-11-16
640 reads
When I was writing my post Capture the most expensive queries across your SQL Server using Query Store a question crossed...
2017-11-16
640 reads
I’ve not done a SQL puzzle for a while so thought it was getting overdue…
I set this one for my...
2019-04-26 (first published: 2017-11-08)
1,483 reads
I’m a big fan of using queries based on the dynamic management view sys.dm_exec_query_stats to capture the most resource hungry...
2019-04-26 (first published: 2017-11-01)
5,091 reads
SQLCMD variables can be a useful way of having changeable parameters for your SQL scripts, allowing you to specify the...
2017-11-01
10,269 reads
In my post about auditing tools in SQL Server I mentioned a few tools we have at our disposal for...
2019-04-26 (first published: 2017-10-24)
4,708 reads
I love the STATISTICS IO and STATISTICS TIME commands. They are such a powerful and easy way to be able...
2017-10-17
507 reads
Unlike some other languages, T-SQL doesn’t have the concept of a constant.
As good coders, we’ve all at some point tried...
2019-04-26 (first published: 2017-10-10)
3,661 reads
As mentioned in my post Auditing Data Access in SQL Server for GDPR Compliance CDC can be a useful tool for...
2017-10-03
17,286 reads
In relation to the GDPR, I’ve recently been looking at the tools available within SQL Server to support auditing our...
2019-04-26 (first published: 2017-09-26)
5,785 reads
We’ve all had to solve deadlock issues. Identify the two conflicting pieces of code, work out an appropriate change to...
2017-09-19
696 reads
By Steve Jones
This month we have a new host, Meagan Longoria, who graciously agreed to help...
By Steve Jones
I’m at the UK Redgate office today, meeting with senior leaders in all areas...
Optimizing Azure SQL Database performance often begins with identifying the most resource-intensive queries. Understanding...
Comments posted to this topic are about the item Creating a JSON Document IV
By VishnuGupthanSQLPowershellDBA
Comments posted to this topic are about the item Restoring Azure Key Vault Keys...
When the schema of an object is changed, SQL Server wipes out the previous...
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 1960If I run this code, how many rows are returned?
SELECT YearEstablished, json_objectagg(city : TeamName) FROM dbo.NFLTeams GROUP BY YearEstablished;See possible answers