Add a comment August 25th, 2009 by Waldar
TSQL Challenge #12
I’m a bit late on this one !
The last submition date for TSQL Challenge #12 was yesterday !
But I had some holidays and the weather was sunny so I spend less time on my computer !
I couldn’t use (nor understand) the arithmetics Pacmann used in the comments of the previous blog entrie.
He managed to avoid the date functions using a lot of trunc (or floor) and modulo functions.
I suppose pure math computes faster than date functions. I’ll have to keep this in mind and to try it out seriously.
Ok, about the TSQL Solution so I did use the date functions !
Let’s begin with the initial datas : Continue reading ‘TSQL Challenge #12 Using Date Functions And Recursive CTE, Laurent Schneider Fun Stuff’
6 Comments August 11th, 2009 by Waldar
NoCOUG Challenge
After many months, Iggy Fernandez published his own solution of the first annual NoCOUG SQL Challenge.
His solution was performing fast from the beginning according to the graph he sent to Chen Shapira back in the announcement days :

I never managed Continue reading ‘NoCOUG SQL Challenge Author Solution, TSQL Challenge #12 !’
Add a comment August 1st, 2009 by Waldar
Well, this was a long wait for every participant of this challenge.
I entry the contest in April, and the winner has been announced yesterday by Iggy Fernandez and Chen Shapira.
It was indeed an amazing challenge and I thanks everyone who brought this up.
It was also the key factor for me to open this blog to publish my solution and more and more things around SQL and relational databases.
The Winner !
Alberto Dell’Era took the first place not with his incredible Fast Fourier Transform O(n^log(n)) complexity, but the other one using Discret Fourier Transform.
In his FFT solution he used the model clause with iterative arguments and the jury saw it has not being straithforward SQL.
But he still have Continue reading ‘First International NoCOUG SQL Challenge Is Over !’
Add a comment July 28th, 2009 by Waldar
Here is my proposal about the TSQL Challenge #11.
Given a product table, and a coupon table, we have to find within one or two coupons which combination gives the best discount, with additional rules :
- the discount price can not be less than 70% of the original price
- the total amount of the discount can not exceed 30$
Here are the products :
ID NAME PRICE
-- ------- ---------
1 PROD 1 100,00
2 PROD 2 220,00
3 PROD 3 15,00
4 PROD 4 70,00
5 PROD 5 150,00
And the coupons : Continue reading 'TSQL Challenge #11 Using Recursive CTE'
Add a comment July 20th, 2009 by Waldar
NoCOUG
Well, I'm not really comparing comparable numbers here.
The NoCOUG last submit date was the last day of june, and therefore it is past.
Iggy Fernandez wrote about the nine different solutions he received (I very like the title he has chosen) !
I'm the seventh in the list there.
As I told before, my favorite solution to this problem is André Aurajo's one.
Alberto Dell’Era wrote an Continue reading 'NoCOUG Got Nine, TSQL Got Eleven'