SQL Statistics – another Spin
I was reading a blog by Pinal Dave that was about using catalog views to obtain information about stats for...
2011-07-01
670 reads
I was reading a blog by Pinal Dave that was about using catalog views to obtain information about stats for...
2011-07-01
670 reads
I was reading a blog by Pinal Dave that was about using catalog views to obtain information about stats for the entire database. While reading the blog, I was...
2011-07-01
22 reads
In my last post concerning my certification journey I said I may post a study guide. I have thought it...
2011-06-30
4,768 reads
In my last post concerning my certification journey I said I may post a study guide. I have thought it over and a sweetened condensed version of some of...
2011-06-30
7 reads
I have a new tune stuck in my head now. It got stuck there this afternoon shortly after my computer...
2011-06-30
1,636 reads
I have a new tune stuck in my head now. It got stuck there this afternoon shortly after my computer was forced into a reboot. I was in the...
2011-06-30
7 reads
Despite my desire to do one exam a week in pursuit of the MCITP Certifications for DBA and Developer in...
2011-06-27
765 reads
Despite my desire to do one exam a week in pursuit of the MCITP Certifications for DBA and Developer in SQL 2008, other things came up that have slowed...
2011-06-27
3 reads
When I first read this article, I thought to myself “I have no clue on this one. What could I...
2011-06-14
733 reads
There are three types of disasters that are seldom expected. Read about the fun of dealing with these different types of disasters.
Related Posts:
The Mystery of Missing Backup Files December...
2011-06-14
3 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