Skip to content
Advertisement

Tag: statistics

Sql: Find sum of column from second table using date from first table

I’ve been struggling to build a query that calculate the sum of column called ‘TIDAL_VOLUME’ with respect to date value that’s coming from another table. Please see the content of the Table_1: Please see the content of the Table_2: Note: TIDAL_VOLUME might have NULL as well. Now, the start time for O2_Device value ‘Endotracheal tube’ is ‘2013-08-06 08:10:05’ for same

Product() aggregate function

While explaining some concepts over CTE, was asked with a cute question.. can we find the multiplication of rows , while we always concentrate on the SUM() from a fresher. That gave me a thought! Is it ever possible with just an SQL. I was also considering the maximum number precision we can even support, since the product may be

SQL Top 10 Sales Every Month

Greeting all. I have a SQL 2008 express database, lets name is tbl_Merchant, similar as following: Merchant | Sales | Month Comp.1 100 1 Comp.2 230 1 Comp.3 120 1 Comp.1 …

Detecting abuse for post rating system

I am using a wordpress plugin called “GD Star Rating” to allow my users to vote on stories that I post to one of my websites. http://everydayfiction.com/ Recently we have been having a lot of abuse of the system. Stories that have obviously been voted up artificially. “GD Star Rating” creates some detailed logs when a user votes on a

Advertisement