MDX Puzzle #5
Writing YTD totals and Running totals using T-SQL can take a little effort. However, with MDX it's not too difficult. ...
2010-08-01
547 reads
Writing YTD totals and Running totals using T-SQL can take a little effort. However, with MDX it's not too difficult. ...
2010-08-01
547 reads
This puzzle may not have been much of a challenge, but it introduced two new MDX concepts. I have to...
2010-07-30
1,557 reads
Now that we are into the third quarter of 2010 I decided to post an update of my 2nd quarter...
2010-07-28
1,010 reads
This puzzle is rather simple, but it does introduce a few new things. Using T-SQL you typically filter queries with...
2010-07-28
551 reads
This past weekend I had the opportunity to hangout with some of the brightest upcoming SQL Server Professionals and a...
2010-07-25
606 reads
I recently had the opportunity to do two presentation on SQL Server R2 for the DBA. In the first session...
2010-07-23
532 reads
Last night (July 21, 2010) I had the honor of being a speaker at the Baton Rouge .Net User Group. ...
2010-07-22
810 reads
Join Adam Jorgensen, tomorrow on the SQL Lunch to learn about Dimensional Modeling. Go to SQL Lunch and add this...
2010-07-21
821 reads
Tomorrow at 11:00 AM EST I will be giving a talk on SQL Server 2008 R2 for the DBA. Here...
2010-07-21
505 reads
We at the SQL Lunch would like to extend an invitation to all of the PASS speakers. If you are...
2010-07-18
399 reads
If you've ever loaded a 2 GB CSV into pandas just to run a...
By James Serra
What problem is Fabric Ontology trying to solve? For years, most data conversations have...
By Steve Jones
Recently I ran across some code that used a lot of QUOTENAME() calls. A...
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...
Comments posted to this topic are about the item The string_agg function
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