Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Data Comparison...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3412 of 3559
Post > Topic >>

Data Comparison Single Table Question

by bryan.emrys@[EMAIL PROTECTED] (Bryan Emrys) Apr 16, 2008 at 06:34 AM

I can handle this outside sql, but it seems like I should be able to do
this in sql as well. 

1 table: countries. 
3 columns: id, name, price

What I'm trying to get is a result of the price differences between every
country.

So if the data looks like (ignoring the id field)

Taiwain 30
UK 50
US 40

I'm trying to build a matrix that looks like:
		Taiwan	UK	US
Taiwan	0		-20	-10
UK		20		0	10
US		10		-10	0

Any pointers would be appreciated.

Bryan

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 2 Posts in Topic:
Data Comparison Single Table Question
bryan.emrys@[EMAIL PROTEC  2008-04-16 06:34:27 
Re: Data Comparison Single Table Question
osvaldo.kussama@[EMAIL PR  2008-04-16 12:09:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 22:08:56 CDT 2008.