External Article

SQL Server RDL Specification

In today's database reporting market, most vendor applications use a proprietary format for representing the definition of a report. In addition, vendors that provide a report execution environment usually only support their own design tools. For customers, this means that reports cannot be easily moved between different reporting implementations and that there are few options for choosing new tools that work with their existing execution environments.

Blogs

Stop Using Pandas for Aggregations — Try DuckDB Instead

By

If you've ever loaded a 2 GB CSV into pandas just to run a...

Understanding Fabric Ontology

By

What problem is Fabric Ontology trying to solve? For years, most data conversations have...

QUOTENAME Basics: #SQLNewBlogger

By

Recently I ran across some code that used a lot of QUOTENAME() calls. A...

Read the latest Blogs

Forums

Alamat kontak resmi BCA KCP Pedurungan | Tlp/Wa:0817866887

By Layanan_BCA

Tlp/Wa_Cs:0817-866-887  Jl. Brigjen Sudiarto No.294, Palebon, Kec. Pedurungan, Kota Semarang, Jawa Tengah 50273

Alamat kontak resmi BCA KCP Majapahit Telp:0817866887

By Layanan BCA_24jam

Tlp/Wa_Cs:0817-866-887  Jl. Majapahit No.112, Pandean Lamper, Kec. Gayamsari, Kota Semarang, Jawa Tengah 50161

Alamat kontak resmi BCA KCU BANYUWANGI Telp:0817866887

By Layanan BCA 24 JAM

Tlp/Wa_Cs:0817-866-887  Jl. Jenderal Ahmad Yani No.24-26, Panderejo, Kec. Banyuwangi, Kabupaten Banyuwangi, Jawa Timur 68416

Visit the forum

Question of the Day

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