TSQL Challenge 65 - Solving the Running Total Problem
This challenge invites you to solve one of the most common calculation challenges seen in applications that deal with financial -transactions.
2011-09-19
1,644 reads
This challenge invites you to solve one of the most common calculation challenges seen in applications that deal with financial -transactions.
2011-09-19
1,644 reads
This challenge invites you to solve a payroll challenge which requires special calculation of holidays and absences that are adjacent to holidays
2011-09-05
1,361 reads
2011-08-22
1,894 reads
Read the input string and break each sentence into groups of 5 words. A row may contain more than one sentence. Each sentence in the input should start a new group.
2011-08-08
1,215 reads
This challenge is to generate an HTML calendar based on the data stored in a table.
2011-07-25
1,835 reads
Your job is to read a string containing product hierarchy information and generate a relational table (result set) representing the hierarchy of categories.
2011-07-11
987 reads
Your job is to generate a string using Forsyth-Edwards Notation which represents the final position of pieces after performing a series of moves from the original position
2011-06-27
849 reads
Your job is to read the input string and generate a result set that represents the position of pieces in a chess board.
2011-06-13
1,760 reads
Your job is to scan the trades data and identify combination of trades that match a given rollup data.
2011-05-30
899 reads
This challnge invites you to generate a Sierpinsky carpet using TSQL
2011-05-16
2,518 reads
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