TSQL Challenge 58 - Playing Chess in TSQL – Part 1
Your job is to read the input string and generate a result set that represents the position of pieces in a chess board.
2011-06-13
1,774 reads
Your job is to read the input string and generate a result set that represents the position of pieces in a chess board.
2011-06-13
1,774 reads
Your job is to scan the trades data and identify combination of trades that match a given rollup data.
2011-05-30
905 reads
This challnge invites you to generate a Sierpinsky carpet using TSQL
2011-05-16
2,525 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,316 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,211 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,543 reads
This challenge is intended to calculate company's wage spent below a top level manager.
2011-03-21
1,648 reads
This challenge invites you to write a query that converts binary values into decimal format.
2011-03-07
6,713 reads
The purpose of this challenge is to test your query writing skills with a limited set of TSQL keywords.
2011-02-21
1,715 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,409 reads
By Steve Jones
Thanks to everyone that attended my sessions at VS Live San Diego yesterday. It...
By Steve Jones
I was creating a question on sp_readerrorlog and realized that this procedure is different...
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
Comments posted to this topic are about the item The Disabled Index
Comments posted to this topic are about the item Server-Level Table sizes
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers