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,646 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,646 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,367 reads
2011-08-22
1,898 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,217 reads
This challenge is to generate an HTML calendar based on the data stored in a table.
2011-07-25
1,836 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
852 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,765 reads
Your job is to scan the trades data and identify combination of trades that match a given rollup data.
2011-05-30
901 reads
This challnge invites you to generate a Sierpinsky carpet using TSQL
2011-05-16
2,520 reads
I’ve been thinking a lot lately about what it actually takes to make an...
By Steve Jones
Redgate is a for-profit company. We look to make money by building and selling...
I’ve uploaded the slides for my Techorama session Microsoft Fabric for Dummies and my...
Comments posted to this topic are about the item Even When You Know What...
Comments posted to this topic are about the item The New Software Team
Comments posted to this topic are about the item Database Mail in SQL Server...
We create the following table and then insert some records in it:
create table t1 ( id int primary key, category char(1) not null, product varchar(50) ); insert into t1 values (1, 'A', 'Product 1'), (2, 'A', 'Product 2'), (3, 'A', 'Product 3'), (4, 'B', 'Product 4'), (5, 'B', 'Product 5');What happens if we execute the following query in both Sql Server and PostgreSQL?
select id,
category,
string_agg(product, ';')
over (partition by category order by id
rows between unbounded preceding and unbounded following) as stragg
from t1; See possible answers