TSQL Challenge 55 - Multiply two very long decimal strings and return
This challenge to multiply two positive integer strings and return their product. The strings can be really long: up to 1024 digits
2011-05-02
1,309 reads
This challenge to multiply two positive integer strings and return their product. The strings can be really long: up to 1024 digits
2011-05-02
1,309 reads
Your job is to write a query that identifies the longest matching country/area code from each phone number based on the information stored in an area-code reference table.
2011-04-18
1,203 reads
A SQL Server instance is set up to log the session start time and end time into a table. Given this table, your job is to find all time intervals in which no one is logged in.
2011-04-04
1,538 reads
This challenge is intended to calculate company's wage spent below a top level manager.
2011-03-21
1,631 reads
This challenge invites you to write a query that converts binary values into decimal format.
2011-03-07
6,704 reads
The purpose of this challenge is to test your query writing skills with a limited set of TSQL keywords.
2011-02-21
1,709 reads
Several technicians are sent to a customer premises to do a certain maintenance work. Your task is to process the activity log entered by each technician and identify overlaps.
2011-02-07
1,406 reads
This challenge is to parse and evaluate arithmetic expressions using TSQL.
2011-01-24
2,295 reads
A table contains the list of modifications made to each card. Your job is to write a query that shows the first number, current number (most recent) and the number of changes made.
2011-01-10
957 reads
This challenge is a slightly enhanced version of the ‘remove leading zeros’ problem
2010-12-27
1,729 reads
I’ve been thinking a lot lately about what it actually takes to make an...
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...
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