New answers tagged

1 vote

How to make the first match in a group a different group

RANK helped me: select min(id) id, currency, sum(amount) FROM (select id, currency, amount, RANK () OVER ( PARTITION BY currency ORDER BY id ...
user avatar
  • 393
26 votes

Why MERGE doesn't insert more than 277 records into a table which is configured with temporal table and a non-clustered index on history table

Azure SQL Database sometimes builds an invalid execution plan for your merge-insert. When it decides to maintain the column store history table using a single operator (a narrow plan) everything is ...
user avatar
  • 71k

Top 50 recent answers are included