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

TSQL Challenge 82 - Find elements that uniquely make up a group

By Jacob Sebastian,

TSQL Challenge 82 - Find elements that uniquely make up a group

The challenge is to find the Tax Code based on Price. There is a table called "LineItems" that have Invoice Number and Price. There is another table "Sales" contains Invoice Number, Amount and Tax Code. Each sales amount is uniquely made up by the sum of one or more prices. Based on this you should assign the tax code to each price.

http://beyondrelational.com/puzzles/challenges/116/find-elements-that-uniquely-make-up-a-group.aspx

Total article views: 1176 | Views in the last 30 days: 1
 
Related Articles
ARTICLE

Usage Based Pricing

Software pricing is a controversial topic, but Steve Jones found an article saying many enterprises ...

FORUM

Pricing EDI Feed Processing System

Creating a system that will process EDI 811 (Invoices) feeds and am curious on pricing options.

FORUM

Unique Constraint

Unique Constraint

FORUM

Unique Constrain

Unique Constrain

ARTICLE

A Stock Price Correlation Matrix

Building a Stock Price Correlation Matrix Using TVPs, a CROSS JOIN and the PIVOT Function

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