T-SQL Challenges

Technical Article

TSQL Challenge 28 - SELECT TOP N articles from each category from a SQL Server 2000 database

  • Article

The challenge is to write a query that returns the articles to be displayed in the home page of the website. N number of articles from each category is to be selected where N is configured in the Categories table. Each category should select the most recent N articles. ArticleID can be used to identify the most recent articles. An article with a higher number indicates a more recent article.

2010-04-19

2,022 reads

External Article

Celko's SQL Stumper: The Class Scheduling Problem

  • Article

What can we use in SQL instead of E. F. Codd's T theta operators for best-fit? Joe Celko returns with another puzzle that isn't new, in fact it already features “Swedish”, “Croatian” and “Colombian” solutions in chapter 17 of Joe's 'SQL for Smarties' book. These were all written before CTEs or the new WINDOW functions. Is there now a better solution? Was there one even then? We leave it to the readers to provide the answer!

2010-01-27

1,535 reads

Technical Article

TSQL Challenge 21 - Reading, recognizing and processing graphical representation of digits.

  • Article

Here is a challenge that takes you away from those repetitive boring type of queries that you write over and over again, several times a day. All of us, the database people, are familiar with thinking in set based manner as well as row by row style. Here is something that is very interesting where you might need to process records in a 'three-line-at-a-time' fashion.

2010-01-11

2,826 reads

Blogs

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Snowflake + Azure blob

By

Let’s go back to data platforms today and I want to talk about a...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers