SQL GROUP BY Alias - An Oracle feature that would be great in SQL Server
Learn about using an alias in the GROUP BY clause for complex SQL Server code instead of having to rewrite the code in the GROUP BY.
Learn about using an alias in the GROUP BY clause for complex SQL Server code instead of having to rewrite the code in the GROUP BY.
Fingerprint readers on laptops are shown not to be as secure as they could be, and primarily because the manufacturers haven't done a good job implementing the secure protocols.
Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.
Azure SQL Managed Instance is fully managed SQL Server instance hosted in Azure cloud. Managed Instance introduces some limits such as max log write throughput that can slow down your workload. In this post you will see how to identify write log throughput issue on Managed Instance.
As data grows and databases become larger and more complicated, data
subsetting provides a method of working with a smaller, lighter copy of a
database to make development and testing faster and easier.
In this article, James Hemson poses the questions; what exactly is data subsetting, how and why are developers using it – or not using it, and
what’s prompting conversations about it?
Love is many a splendored thing. It is also a much-abused word with many different (and twisted) meanings. The type of love I wish to speak about today is not friendship, nor the kind of thing that makes your heart go pitter patter in the springtime, but rather the type of love known as storge, […]
Steve has some advice on how to grow your career by growing your skills and developing deeper knowledge.
This article looks at the basics of the OVER() clause and how the PARTITION section works.
The rise of cross platform databases which are both on-premises and in the cloud, alongside decreasing customer satisfaction and trust in digital channels, has increased the importance - and value - of enhanced database monitoring. Find out how using a database monitoring tool creates value for the whole organization.
This article covers how to use the different date and time functions when working with Spark SQL.
By HeyMo0sh
Over time, I’ve realised that one of the hardest parts of cloud management isn’t...
By HeyMo0sh
One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...
By Steve Jones
I come to Heathrow often. Today is likely somewhere close to 60 trips to...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
Comments posted to this topic are about the item Answering Questions On Dropped Columns
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers