Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

TSQL Challenge 39 - Calculate Gross Profit by Item using FIFO method

By Press Release, 2010/09/20

This challenge is related to an inventory management application where your job is to calculate the profitability by item (cost v/s sales) using First-In-First-Out (FIFO) processing method.

The inventory application has a table that stores the purchase information with the cost and another table that stores the sales details. You need to calculate the profit earned by each sales by calculating the differences between purchase cost and sales price. If an item is purchased more than once, it is assumed that the oldest stock will be sold first.

http://beyondrelational.com/blogs/tc/archive/2010/09/20/tsql-challenge-39-calculate-gross-profit-by-item-using-fifo-method.aspx

Total article views: 1728 | Views in the last 30 days: 1
 
Related Articles
FORUM

Selective query for profit

Hello all. I have a cube with this dimension (eliminate others): [Document type] (with childs= [Do...

FORUM

Calculation using a Calculated Measure

Calculation using a Calculated Measure

FORUM

TSQL Challenge 39 - Calculate Gross Profit by Item using FIFO method

Comments posted to this topic are about the item [B]TSQL Challenge 39 - Calculate Gross Profit by I...

FORUM

Selecting a customer's first purchase date

Hi Guys, need some help here.. My manager has asked me to write a query that will return all custom...

FORUM

Dimension Calculated Member Problem

Dimension Calculated Member Problem

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones