Jump to content
Software FX Community

sql problem


User (Legacy)
 Share

Recommended Posts

I have created an sql query which produces these results:

Country Region PRO SPREADER

Australia Australia 5 3

France Europe 10 2

Germany Europe 10 3

Holland Europe 12 1

Ireland Europe 3 3

UK Europe 20 5

USA North America 40 6

The SQL Query I used is:

SELECT contact1.country, contact2.uregion, sum(umpro) AS PRO,

sum(umspreader) AS SPREADER

FROM contact1 inner join contact2 on contact1.accountno=contact2.accountno

WHERE contact2.ustatus= 'CURRENT' group by country, uregion

What I want to do is create a BAR graph that shows this:

TOTAL PROs TOTAL Spreaders

Australia 5 3

Europe 35 9

UK 20 5

USA 40 6

In other words i want to sort of combine 2 columns into one....I want to

take UK out from country and show it as a region.

Any ideas?

Thanks!

Stella.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...