Comparing the contents of two tables
I’ve been working on tuning a query for the last week and I’ve had to make several changes to the...
2016-05-16 (first published: 2016-05-12)
3,576 reads
I’ve been working on tuning a query for the last week and I’ve had to make several changes to the...
2016-05-16 (first published: 2016-05-12)
3,576 reads
One of the things I like best about joining in on Adam Machanic’s (b/t) TSQL Tuesday blog party is that...
2016-05-10
500 reads
It always amazes me how often these three commands get confused. Heck it amazes me how long I confused them....
2016-05-04
1,021 reads
You have a database with one or more filegroups, and one or more of those filegroups has multiple files. You’ve...
2016-05-02
1,646 reads
Oh Noes! I have a job that requires me to run an SSIS package, cmdshell script, etc. And I need...
2016-04-27
2,598 reads
I’m a big fan of certifications as a training exercise. However not everyone has the same interests. With the new...
2016-04-25
1,828 reads
Me: I think I’m going create a new playground instance.
Myself: Make sure you use a case sensitive (CS) collation when...
2016-04-20
415 reads
Everyone makes mistakes right? And sometimes you create an object and decide later that you messed up and need to...
2016-04-18
470 reads
It’s T-SQL Tuesday again and this month we are hosted by Jens Vestergaard (b/t) who want’s us to talk about...
2016-04-18 (first published: 2016-04-12)
1,680 reads
I love this somewhat obscure mathematical operator. All it does is return the remainder of a division statement but even...
2016-04-14
500 reads
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...
If you've ever loaded a 2 GB CSV into pandas just to run a...
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