Search This Blog

Tuesday, October 8, 2013

Amazing Video

I found this video on You tube. Make sure you watch it on HD mode on YouTube.


http://www.youtube.com/watch?feature=player_embedded&v=EEu42L0ufBY



Amazing Video

Monday, October 7, 2013

Devil's Circuit

On 6th October 2013, Delhi region saw and experienced Devil’s Circuit, India’s First Obstacle Run Non Competitive Series. People looking for some adventure and fun, wanted to spend their Sunday in a different way soaked themselves up in mud, freezing water, climbed ropes and walls.. yesterday was for them!!! The day saw participants from various walks of life, students, young professionals, foreign nationals, families…just about everyone!!! The spirit of the participants was amazing!! After the race all the participants who completed the race got a beer(for refreshing yourself :) ), Devil’s T-Shirt and an energy drink and of course a medal upon completion. Live music playing throughout the circuit kept the crowd and participants cheered up!!


You could google for pictures of the event and get prepared for the next Devil’s Circuit. For those of you who missed participating in this one, there’s another one scheduled in March 2014 in NCR, followed by next one in Pune, then Hyderabad and finally in Bangalore!!!


Go ahead and have some fun….



Devil's Circuit

Wednesday, October 2, 2013

SQL Server Fun - Averages with Rollup

Here is tsql way of getting averages and also rolling up. Below example is using adventureworks database that is available with SQL server. It is getting average pay rate by each department and also overall by the company.


use [AdventureWorks]

select[Department] = case when grouping(d.GroupName) = 1 then ‘Company Average’

                              else d.GroupName end,

            [Average Pay Rate] = avg(p.Rate)

from (select [EmployeeID], [Rate] = max([Rate])

            from [HumanResources].[EmployeePayHistory]

            group by [EmployeeID]) p

      inner join [HumanResources].[EmployeeDepartmentHistory] h

                  on h.[EmployeeID] = p.[EmployeeID] and h.[EndDate] is null

      inner join [HumanResources].[Department] d on d.[DepartmentID] = h.[DepartmentID]

group by d.[GroupName]

with rollup

order by 1


SQL Server Fun - Averages with Rollup