T-SQL Tuesday #18 – CTEs
To CTE or not to CTE, that is the Question So my post really has nothing to do with the title. This is not a post to help you...
2011-05-10
6 reads
To CTE or not to CTE, that is the Question So my post really has nothing to do with the title. This is not a post to help you...
2011-05-10
6 reads
To CTE or not to CTE, that is the Question
So my post really has nothing to do with the title....
2011-05-10
693 reads
After a whirlwind of last minute changes last month, we expect stability this month with the monthly meeting. Meeting Time is 6:30PM PST Erika Bakse (blog | twitter) has...
2011-05-03
2 reads
After a whirlwind of last minute changes last month, we expect stability this month with the monthly meeting.
Meeting Time is...
2011-05-03
577 reads
Today is Meme Monday and is a little thing that Thomas LaRock (Blog | Twitter) has started. Today he has started things off with a list of things that...
2011-05-02
10 reads
Today is Meme Monday and is a little thing that Thomas LaRock (Blog | Twitter) has started. Today he has started...
2011-05-02
912 reads
SQL Server 2008 has presented us a couple of options to aid in becoming better DBA’s. You can see this evidenced in many ways in the product. A couple...
2011-04-29
9 reads
SQL Server 2008 has presented us a couple of options to aid in becoming better DBA’s. You can see this...
2011-04-29
3,773 reads
Today I had a bit of regret slap me in the face. That face slap came from participation in a SQL Quiz on twitter that was hosted by Paul...
2011-04-29
4 reads
Today I had a bit of regret slap me in the face. That face slap came from participation in a...
2011-04-29
1,367 reads
By Steve Jones
Redgate is a for-profit company. We look to make money by building and selling...
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...
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